Bug 442402

Summary: Unchecking all packages to update is very slow
Product: [Applications] Discover Reporter: David <david.cortes.rivera>
Component: UpdatesAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, aspotashev, nate
Priority: NOR Keywords: usability
Version First Reported In: 5.21.5   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.26
Sentry Crash Report:

Description David 2021-09-13 23:52:39 UTC
SUMMARY
If I am in the "Updates" view and have a few hundred updates or more, clicking the checkbox at the bottom to unselect all updates is really slow.

STEPS TO REPRODUCE
1. Have many package updates available.
2. Open discover and go to the "updates" view.
3. Uncheck the box at the bottom.

OBSERVED RESULT
Takes more than one second to uncheck barely a few hundred packages.

EXPECTED RESULT
Unchecking boxes should have a throughput of several million per second in a modern computer.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.84.5
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2022-07-23 11:00:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/335
Comment 2 Tobias Rautenkranz 2022-07-24 23:49:31 UTC
Git commit eef969681f8c6f18b09a2230cf72f8f7c9a5af2e by Tobias Rautenkranz.
Committed on 23/07/2022 at 10:51.
Pushed by apol into branch 'master'.

Speedup (un-)checking all packages by not updating per item

Tested with 548 packages in the list to update. From ~ 6000 ms to 25 ms
for uncheckAll() and 70 ms for checkAll().

M  +26   -6    libdiscover/UpdateModel/UpdateModel.cpp

https://invent.kde.org/plasma/discover/commit/eef969681f8c6f18b09a2230cf72f8f7c9a5af2e