Repository navigation
common: Report the age of the configuration - #6532
Conversation
0b53e13 to
f617b60
Compare
|
Specifically: gnome-software parses appstream data on startup, which is extremely expensive. It is already using libxmlb, which allows applications to avoid parsing XML data, but it needs to be able to determine the age of the list of remotes in order to determine whether or not the cache is valid. If flatpak can provide the age of the remotes config, then gnome-software could use that information to load a previously-built cache and significantly reduce startup time. (Expected to reduce startup by almost 4s) |
bc25382 to
29e2b23
Compare
|
The changes to flatpak seem fine to me, but I'll leave it up to the gnome-software developers to decide if this is a worthwhile approach. |
pwithnall
left a comment
There was a problem hiding this comment.
This is definitely a worthwhile approach, yes please.
|
Ater working with the gnome-software patch linked above for a while longer, I'd like to see if this can be better aligned with flatpak_installation_create_monitor / less specific to the remotes config. I'll come back to it shortly, but I'd be grateful for suggestions. Thanks. |
|
Minor changes:
Let me know what you think. |
swick
left a comment
There was a problem hiding this comment.
Yeah, looks good after squashing.
pwithnall
left a comment
There was a problem hiding this comment.
I’ve got a review in progress on https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/2395 (sorry I’ve not finished it yet, that’s not very helpful of me), but one of the comments was:
Why use an age rather than mtime? Comparing ages across multiple files sounds like a recipe for a race condition if the checks span the boundary between one second and the next. Using an mtime avoids that.
That's actually the main reason this PR is still a draft: I was asking myself the same question and didn't have an answer. The use of file age ended up in some older revision of the gnome-software PR through copy/paste adapting other sections of the code, and then here for consistency. I'll update both PRs later today (hopefully) to drop the use of age, and then I'll remove the draft status from this PR. Thanks! |
6f92076 to
4f3792e
Compare
pwithnall
left a comment
There was a problem hiding this comment.
This LGTM now, thanks
|
@gordonmessmer please squash the changes |
This change will allow applications to determine if their data is older than the flatpak configuration, to aid cache invalidation.
4f3792e to
664e3fb
Compare
This change will allow applications to determine if their data is older than the flatpak configuration, to aid cache invalidation.