Bug 409599 - Read appstream information in a thread for faster launch speed
Summary: Read appstream information in a thread for faster launch speed
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: PackageKit (show other bugs)
Version: unspecified
Platform: Other Linux
: HI wishlist
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2019-07-07 21:20 UTC by Kai Uwe Broulik
Modified: 2020-01-10 02:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2019-07-07 21:20:56 UTC
SUMMARY
Discover spends significant amount of time on opening in the appstream backend reading yaml files. The Flatpak backend does its metadata initialization in a thread and so should Appstream.
AppStream::Pool::load() accounts for 61% of time spent in discover's main thread until the main window appears.

STEPS TO REPRODUCE
1. Start Discover

OBSERVED RESULT
Takes forever to show a window, more than 5 seconds

EXPECTED RESULT
Shows a window within few hundred milliseconds

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.60
Qt Version: 5.12.3
Comment 1 Aleix Pol 2020-01-10 02:11:25 UTC
Git commit 2ce5eb9dab5b54d396f10fdde435a98181a7b2be by Aleix Pol.
Committed on 10/01/2020 at 02:11.
Pushed by apol into branch 'master'.

pk: Load the AppStream database on a separate thread

Summary:
No need to block the backends load on PackageKit appstream usage.
Related: bug 409262
FIXED-IN: 5.18.0

Test Plan: Tested manually

Reviewers: #discover_software_store, broulik, #plasma

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26547

M  +138  -82   libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
M  +6    -0    libdiscover/backends/PackageKitBackend/PackageKitBackend.h

https://commits.kde.org/discover/2ce5eb9dab5b54d396f10fdde435a98181a7b2be