Bug 466290 - KNS backend is slow and delays Discover from being able to show content after launch
Summary: KNS backend is slow and delays Discover from being able to show content after...
Status: CONFIRMED
Alias: None
Product: Discover
Classification: Applications
Component: KNewStuff Backend (show other bugs)
Version: 5.27.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-23 06:28 UTC by P Fudd
Modified: 2024-08-31 14:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description P Fudd 2023-02-23 06:28:07 UTC
SUMMARY
I updated my system to Fedora 37 last night.  This morning I see the "Updates Available" icon on my dash.  I click on it, and Discover starts up, puts up a "Fetching updates..." message and a progress bar, and then proceeds to take several minutes to load the list of updates.

It would be nice if it could download the list of updates *before* trying to gain my attention.

This irritation is further compounded by the fact that the progress bar travels fast until it reaches about 95%, and then appears to hang (although I'm sure it'll finish... eventually).

And under the hood, the icing on the cake is that the list of updates being downloaded is likely 99% similar to the list it had from the day before, and yet it's downloading the whole thing again.  If it could be changed to download and apply a patch to the list of updates, that would speed things up.  If you could do a DNS lookup of a TXT record (e.g. update-status.kde.org) that returned a signed serial number and date, then the client wouldn't even have to connect to the repository to discover that nothing's changed since the last time they checked.  If the signature is bad or the date is old, fall back to checking the repository.


STEPS TO REPRODUCE
1. Install Fedora (or maybe just KDE)
2. Wait for the "Updates available" icon to appear (hours? days?)
3. Click on the icon

OBSERVED RESULT
"Hurry up and wait" 

EXPECTED RESULT
"Skinner Box"

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora Linux 37 - Kernel 6.1.12-200.fc37.x86_64 (64-bit)
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Aleix Pol 2023-02-24 19:37:47 UTC
Would you be able to tell us if it still happens with "plasma-discover --backends packagekit-backend --mode update"?
If it does, can you check the packagekit-backend part by the other backends as listed in "plasma-discover --listbackends"?

I'm not sure it's updates download that is being slow, it needs to have updated already for us to know that there's updates available at all.
Comment 2 Johan Aires Rastén 2024-06-20 08:47:45 UTC
It doesn't take 5 minutes for me, but I've also found it a slight annoyance that I need to wait for it to fetch updates after the system has told me that updates are available. I've _just_  updated my packages in case that matters, but here are my timings:

Clicking the "updates are available" icon in the systray: 7 seconds to fetch updates.
packagekit-backend: Less than one second, almost immediate on the second attempt.
fwupd-backend: Immediate.
kns-backend: 7 seconds, the terminal is spammed with "log_attica_plugin: We got an OpenDesktop account, but it seems to be lacking the id token. This means an old SignOn OAuth2 plugin was used for logging in. The plugin may have been upgraded in the meantime, but an account created using the old plugin cannot be used, and you must log out and back in again." while it is updating.
flatpak-backend: Immediate.
Comment 3 Nate Graham 2024-06-20 12:34:23 UTC
That's a valuable observation. I can reproduce the issue of the KNS backend being slow AF.
Comment 4 Johan Aires Rastén 2024-06-20 13:08:16 UTC
Is it possible to disable the kns-backend? As far as I can tell, it provides "application addons" and "plasma addons", not sure if I have installed anything from there, but I don't think so. It doesn't seem possible to check installed software per source, would be nice if I could click "Installed" and then "Application Addons" in the sidebar to filter, but when I do this it goes to browse available apps instead. Maybe there's something I could put in .config/discoverrc but I haven't found any documentation for available options
Comment 5 Nate Graham 2024-06-20 16:09:57 UTC
Yes, typically it's packaged separately, so you can just remove the package.

We should make it faster, though.
Comment 6 Johan Aires Rastén 2024-06-21 08:35:41 UTC
Is there any way to list all apps installed from a specific backend? Manually browsing through installed apps in Discover I see that Arc Dark theme and some related packs are distributed by "KDE Store". This would be the KNS backend, right?
Comment 7 Nate Graham 2024-06-21 17:41:15 UTC
That's the KNS backend, yes. There's currently no way to sort installed content by backend or source.
Comment 8 Nate Graham 2024-08-31 14:04:15 UTC
This'll all be substantially improved in Plasma 6.2.0.