When I log in to my session, often there are updates available. The notifier tells me this, and in order for it to know there are available updates, it must check. But, when opening Discover via the notifier, it seems to go through the whole process of checking for updates again, even though it just did that to display that notification to me. It seems unnecessary, and it takes like >30s for it to actually display what updates are available.
Actually, I'm not sure if it even performs a full check. Just after running a system update, it tells me that there are updates available again. I check which ones its talking about, and its all updates that I have just installed. I click Refresh, wait a few minutes for it to complete (mostly packagekit-backend takes up that time), and then it says my system is up to date.
I think part of this is related to https://bugs.kde.org/show_bug.cgi?id=438670
As you can see here: https://invent.kde.org/plasma/discover/-/blob/master/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp#L101 We only download updates if the cache is over 1h old. So it sure should not take a few minutes. Maybe you could help providing a pkmon log?
(In reply to Aleix Pol from comment #3) > As you can see here: > https://invent.kde.org/plasma/discover/-/blob/master/libdiscover/backends/ > PackageKitBackend/PackageKitBackend.cpp#L101 > > We only download updates if the cache is over 1h old. So it sure should not > take a few minutes. > > Maybe you could help providing a pkmon log? I think that's kind of the issue, the update cache can be outdated while the updates available notifier is still there. I think it should be only ever checking in the background, and doing so hourly, or some given period of time, instead of checking when the user clicks and opens Discover. I'm on Fedora so having the GUI blocked by refreshing the cache means waiting on the pk backend for a long time, but I think purely background refreshes would avoid this. The pkmon log I'm about to attach is from the very start of the session, before wifi connection is established, so it includes the notifier appearing. After that, I click on the notifier to open Discover, and wait for it to load fully.
Created attachment 140206 [details] pkmon output
Refreshing takes only a few seconds for me on Fedora FWIW.
Git commit d38e7ad9f2aeb69127b6e62ac50f655077d26e1c by Aleix Pol. Committed on 28/11/2022 at 20:48. Pushed by apol into branch 'master'. flatpak: Do not check for updates immediately Wait for a bit to check for updates, instead just show the locally available data ASAP. Related: bug 433587 M +14 -5 libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp M +2 -1 libdiscover/backends/FlatpakBackend/FlatpakBackend.h https://invent.kde.org/plasma/discover/commit/d38e7ad9f2aeb69127b6e62ac50f655077d26e1c