Rework threading model
Placeholder issue for efforts to rework the threading model for gnome-software.
Remaining vfuncs to port (as of !1423 (merged)):
Plugin \ Vfunc | gs_plugin_adopt_app() |
gs_plugin_add_updates() |
gs_plugin_add_sources() |
gs_plugin_add_updates_historical() |
gs_plugin_add_categories() |
gs_plugin_add_recent() |
gs_plugin_update_cancel() |
gs_plugin_app_install() |
gs_plugin_app_remove() |
gs_plugin_update_app() |
gs_plugin_download_app() |
gs_plugin_download() |
gs_plugin_app_upgrade_download() |
gs_plugin_app_upgrade_trigger() |
gs_plugin_file_to_app() |
gs_plugin_url_to_app() |
gs_plugin_update() |
gs_plugin_add_langpacks() |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
appstream |
!1432 (merged) | !1328 (merged) | TODO | |||||||||||||||
dpkg |
TODO | |||||||||||||||||
dummy |
TODO | TODO | !1328 (merged) | TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | |||||||
eos-updater |
TODO | |||||||||||||||||
fedora-langpacks |
TODO | |||||||||||||||||
flatpak |
TODO | TODO | TODO | !1432 (merged) | !1328 (merged) | TODO | TODO | TODO | TODO | TODO | TODO | |||||||
fwupd |
TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | ||||||||||
packagekit |
TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | ||||||||
systemd-updates |
TODO | TODO | TODO | |||||||||||||||
rpm-ostree |
TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | TODO | |||||||||
snap |
TODO | TODO | TODO | TODO | TODO | TODO |
Once these vfunc implementations are all ported, and the gs_plugin_*()
g_module_symbol()
-based code is all gone, there are some follow-up improvements which I want to make. It might make sense to split them out to follow-up issues when the time comes:
-
Refactor “vfunc not implemented” code to always return a (distinct) error and let the caller decide whether they care: !1266 (comment 1399606) -
Improve logging and sysprof output for GsPluginJob
instances. Probably add a global list of in-progressGsPluginJobs
, with the aim of making it easier to debug which job is causing a problem, and to expose progress information for background jobs to the UI where needed. -
Rework the webapps plugin to not use a worker thread (see discussion). -
Go through each plugin and verify, simplify and document their locking models. For example, once this issue is fixed many plugins will be running entirely out of the main thread, and will no longer need internal locking. -
Pull the appstream plugin ( gs-plugin-appstream.c
) into the core, as appstream is a core dependency of everything we do now (this has changed from when gnome-software was originally written), and all the other plugins depend on it. -
Make the plugins independent from each other by dropping a lot of the remaining gs_plugin_add_rule()
calls. This will allow the plugins to be run in parallel more, which will speed things up. -
Parallelise GsPluginJobRefine
(see the FIXME note ings-plugin-job-refine.c
). -
Improve the plugin API documentation ( $builddir/doc/api/html/api.html
) now that the plugin vfuncs are defined on a class struct rather than just via a well-known name.