Bug 458462 - Please reduce need for repo refreshes / speed them up
Summary: Please reduce need for repo refreshes / speed them up
Status: RESOLVED DUPLICATE of bug 459207
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.25.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-29 09:24 UTC by David
Modified: 2022-09-19 21:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2022-08-29 09:24:43 UTC
SUMMARY
Discover updates repo caches every time it is started. This becomes a problem because the process is painfully slow, even if it was already done a couple minutes before.
Please, reduce the number of caches updates or at least speed them up because otherwise the whole experience is compromised.


STEPS TO REPRODUCE
1. Open Discover in any way: click on updates notification, search for a new app from krunner, or simply click the launcher
2. wait 
3. wait

OBSERVED RESULT
You basically end up waiting, on whatever page, for at least 30 seconds.

EXPECTED RESULT
Discover should refresh caches at most once/twice a day, just like DNF does. And when it does, it should take no more than its CLI backend. Take for example the use case of searching for an app in krunner: which is wonderful, works like a charm but then you have to wait a minute or so before the install button becomes active, and this kinda ruins the game.
Also the progress bar should be reworked as it sits on 75% right away, and basically makes the whole process scaled to the range 75-100%.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.2
Kernel Version: 5.19.4-100.fc35.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: Dell Inc.
Product Name: Inspiron 5570

ADDITIONAL INFORMATION
- Using Discover in Kubuntu does not bring in such issues
- Using pkcon refresh/update from CLI does not take as much time as Discover does
- Same story with flatpak backend
Comment 1 Nate Graham 2022-08-30 20:47:54 UTC
In general when this happens it's a particular backend being slow. Can you find out what it is for you?

You can find out by running Discover with only one backend at a time, e.g. `plasma-discover --backends packagekit-backend` to only use the PackageKit backend. You can find a list of installed backends with `plasma-discover --listbackends`

> Also...
Please open other bug reports for other issues.
Comment 2 David 2022-08-30 22:03:41 UTC
(In reply to Nate Graham from comment #1)
> In general when this happens it's a particular backend being slow. Can you
> find out what it is for you?
> 
> You can find out by running Discover with only one backend at a time, e.g.
> `plasma-discover --backends packagekit-backend` to only use the PackageKit
> backend. You can find a list of installed backends with `plasma-discover
> --listbackends`

So far what I have collected seems to indicate that it's the sum of all delays from all back-ends the problem, which could also make sense, but I'm getting different results on different tries of the same back-end. 
I am going to make some more tests and come back once got consistent results. 


> > Also...
> Please open other bug reports for other issues.

sure I'll do
Comment 3 Bug Janitor Service 2022-09-14 04:36:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 David 2022-09-19 17:51:18 UTC
(In reply to Nate Graham from comment #1)
> In general when this happens it's a particular backend being slow. Can you
> find out what it is for you?
> 
> You can find out by running Discover with only one backend at a time, e.g.
> `plasma-discover --backends packagekit-backend` to only use the PackageKit
> backend. You can find a list of installed backends with `plasma-discover
> --listbackends`
> 
> > Also...
> Please open other bug reports for other issues.

Ok, after a number of tests, I can conclude PackageKit is causing the issue. Other backends all perform reliably whereas packagekit often gets stuck (and even if it does not, it's often slow). I can reproduce this behavior also from command line.
At this point, I'm pretty confident it's not something Discover can take care of. 
But still, what do you think of tuning the need for cache refreshes so that in general they don't happen so often?
Comment 5 Nate Graham 2022-09-19 20:05:09 UTC
Yeah that's still not ideal. That issue is more or less tracked under Bug 459207, so let's continue there.

Please do file a bug on PackageKit at https://github.com/PackageKit/PackageKit/issues!

*** This bug has been marked as a duplicate of bug 459207 ***
Comment 6 David 2022-09-19 21:01:41 UTC
(In reply to Nate Graham from comment #5)
> Yeah that's still not ideal. That issue is more or less tracked under Bug
> 459207, so let's continue there.
Fine!

> Please do file a bug on PackageKit at
> https://github.com/PackageKit/PackageKit/issues!

Yeah, sure. Is there any issue you have already filed or should I simply go for a new one?
Comment 7 Nate Graham 2022-09-19 21:08:14 UTC
Go for a new one