Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • gnome-software gnome-software
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 192
    • Issues 192
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gnome-softwaregnome-software
  • Issues
  • #1472
Closed
Open
Issue created Oct 01, 2021 by Philip Withnall@pwithnall🚫Maintainer

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 !1616 (merged) !1616 (merged) TODO TODO TODO
eos-updater TODO
fedora-langpacks TODO
flatpak TODO TODO TODO !1432 (merged) !1328 (merged) TODO TODO !1616 (merged) TODO TODO !1616 (merged)
fwupd TODO TODO TODO TODO TODO !1616 (merged) !1616 (merged) TODO
packagekit TODO TODO TODO TODO TODO TODO !1616 (merged) TODO TODO TODO
systemd-updates TODO TODO !1616 (merged)
rpm-ostree TODO TODO TODO TODO TODO !1616 (merged) TODO TODO TODO
snap TODO TODO TODO TODO TODO !1616 (merged)

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-progress GsPluginJobs, 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. (Note: Since !1616 (merged) this has been added as GsJobManager, but it could be made more useful for debugging.)
  • 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 in gs-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.
  • Rework gs_app_get_cancellable() — it doesn’t make sense to have one cancellable per app, since an app could have multiple pending operations
  • Rework gs_app_get_pending_action() — it doesn’t make sense, as an app could have multiple pending actions (jobs)
  • Potentially drop gs_app_set_is_update_downloaded() because it’s only used by flatpak and is now deprecated
  • Potentially drop GS_APP_QUIRK_NEEDS_USER_ACTION and gs_app_{get,set}_action_screenshot() because they feel wrong, although the rework done on them in !1616 (merged) might now be sufficient
  • Rework how QUEUED_FOR_INSTALL is implemented: it’s currently handled specially in plugins (such as flatpak and PackageKit), but could probably just be handled globally in GsPluginJobInstallApps
Edited Mar 15, 2023 by Philip Withnall
Assignee
Assign to
Time tracking