pk: Load the AppStream database on a separate thread
ClosedPublic

Authored by apol on Jan 9 2020, 4:42 PM.

Details

Summary

No need to block the backends load on PackageKit appstream usage.

BUG: 409262
BUG: 409599
FIXED-IN: 5.18.0

Test Plan

Tested manually

Diff Detail

Repository
R134 Discover Software Store
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Jan 9 2020, 4:42 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 9 2020, 4:42 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Jan 9 2020, 4:42 PM
ngraham added a subscriber: ngraham.Jan 9 2020, 4:49 PM

Very nice. Launching definitely feels faster now. This also fixes https://bugs.kde.org/show_bug.cgi?id=409262 for me. Does that make any sense?

One thing I notice is that the increased speed results in the "you're not connected to a network" message erroneously appearing:

apol added a comment.EditedJan 9 2020, 5:22 PM

Very nice. Launching definitely feels faster now. This also fixes https://bugs.kde.org/show_bug.cgi?id=409262 for me. Does that make any sense?

Yes, it makes sense.

One thing I notice is that the increased speed results in the "you're not connected to a network" message erroneously appearing:

I get it too, will have to see how to convince the featured model that it's still loading.

ngraham edited the summary of this revision. (Show Details)Jan 9 2020, 5:30 PM
broulik added inline comments.Jan 9 2020, 8:12 PM
libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
198

Coding style ..

501

Why is this delayed now?

apol marked 2 inline comments as done.Jan 10 2020, 2:08 AM
apol added inline comments.
libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
501

It's a quirk of how ResultsStream works. We need the results to be emitted when something is listening to it. If you look at it closely, it was already done before. I'll remove the other delay.

apol updated this revision to Diff 73173.Jan 10 2020, 2:09 AM
apol marked an inline comment as done.

kai comments

This revision was not accepted when it landed; it landed in state Needs Review.Jan 10 2020, 2:11 AM
This revision was automatically updated to reflect the committed changes.