Use separate GsCategoryPage for each category
Currently, we use the same GsCategoryPage
for all categories. This means we need to process, refine and recreate the entire page every time, even though most of the times the app listing remains the same. The time it takes to load each category is quite long and this make GS not very usable for regular use. This issue is getting amplified as more apps keep getting added.
Since, gnome-software
runs as a GApplication
service, this optimization could be an issue sometimes, as the user could be using the same desktop session for many days (meaning same gnome-software
process). So, any new updates (e.g. to the appstream metadata) will not be reflected, until the category pages are reloaded. Maybe, we can do one of the following:
- Keep a
last-modified-time
for all backends (packagekit
/snap
/flatpak
/appstream
/epiphany
etc), and reload the category page only when one of the plugins report a change. - Simple timer based approach (check every N hours etc).
Also, currently we don't recreate the category page if we go back to Overview
and visit the same category page. So, in a sense we already have the optimization partially (and all issues associated with it as explained above), even in the current code.