flatpak: use container resolver to resolve flatpak refs#2334
Open
lzap wants to merge 3 commits into
Open
Conversation
supakeen
previously approved these changes
May 13, 2026
We need to optimize memory consumption and we ideally want to do this just once, for container refs. Flatpak did have its own resolver, let's reuse what we have.
We want to avoid downloading the registry index for every flatpak ref.
achilleas-k
approved these changes
May 13, 2026
Member
achilleas-k
left a comment
There was a problem hiding this comment.
Good stuff, thank you.
LGTM
Comment on lines
+63
to
+65
| echo "git status:" | ||
| git status -vv | ||
| echo "-----------------------------------------------------------------------------" |
Contributor
Author
|
Also tested memory, is down from 413 MiB to 285 MiB. Before: After: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to optimize memory consumption and we ideally want to do this just once, for container refs. Flatpak did have its own resolver, let's reuse what we have.
Initially I wanted to solve the memory problem described here: osbuild/image-builder-cli#514
Only to figure out that fedora registry does not support server-side filtering, at least not the one we need here. I think we really need to optimize the parsing. I believe @achilleas-k has some ideas already.
Update: I did have one idea which was confirmed - aren't we querying the same image over and over again just with different inputs? And this was confirmed. A simple patch (2nd commit) that implements a trivial "cache" shaves the processing time significantly. It just remembers the last tag and parsed data so it can be immediately reused, no need for fancy LRU caching or something like that.
Before:
After:
Now, I really hope this is not just
quay.iobeing slow for me, please test this too :-)Reminder for myself: rebase after osbuild/osbuild-composer#5136 and osbuild/osbuild-composer#5138