Bug 442402 - Unchecking all packages to update is very slow
Summary: Unchecking all packages to update is very slow
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Updates (other bugs)
Version First Reported In: 5.21.5
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-09-13 23:52 UTC by David
Modified: 2022-07-27 22:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.26
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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