Bug 464467 - Updates page is super slow when it has a lot of offline updates
Summary: Updates page is super slow when it has a lot of offline updates
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Updates (offline) (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-18 16:06 UTC by Nate Graham
Modified: 2024-03-30 04:53 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-01-18 16:06:57 UTC
STEPS TO REPRODUCE
1. Use offline updates
2. Open Discover
3. Click on "Updates" when it has 517 items to update
4. Click on the list item for the offline update
5. Click the "More information button


OBSERVED RESULT
After step 3, the Updates page opens but it's slow and laggy.

After step 5, Discover hangs for about 30 seconds.


EXPECTED RESULT
No lags, no hangs, good performance.


ADDITIONAL INFORMATION
No such issues seen with interactive updates.


After step 5, the following is printed to the console:

$  (mr/896) plasma-discover
adding empty sources model QStandardItemModel(0x24b67e0)
file:///home/nate/kde/usr/lib64/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
file:///home/nate/kde/usr/lib64/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
file:///home/nate/kde/usr/lib64/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
file:///home/nate/kde/usr/lib64/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
file:///home/nate/kde/usr/lib64/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
error fetching updates: PackageKit::Transaction::ErrorInternalError "could not create transaction /47375_dcdbcabb: failed to allocate /47375_dcdbcabb as uid 1000 already has 501 transactions in progress"
error fetching updates: PackageKit::Transaction::ErrorInternalError "could not create transaction /47376_eeddaeba: failed to allocate /47376_eeddaeba as uid 1000 already has 501 transactions in progress"
error fetching updates: PackageKit::Transaction::ErrorInternalError "could not create transaction /47377_aaceacba: failed to allocate /47377_aaceacba as uid 1000 already has 501 transactions in progress"
error fetching updates: PackageKit::Transaction::ErrorInternalError "could not create transaction /47378_eedbaaae: failed to allocate /47378_eedbaaae as uid 1000 already has 501 transactions in progress"
error fetching updates: PackageKit::Transaction::ErrorInternalError "could not create transaction /47379_cebdbaeb: failed to allocate /47379_cebdbaeb as uid 1000 already has 501 transactions in progress"
error fetching updates: PackageKit::Transaction::ErrorInternalError "could not create transaction /47380_bbeadeed: failed to allocate /47380_bbeadeed as uid 1000 already has 501 transactions in progress"

[and about a million more of these; too many for Bugzilla to handle without me chopping off the output]
Comment 1 Bug Janitor Service 2024-03-20 23:46:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/793
Comment 2 Harald Sitter 2024-03-27 00:17:29 UTC
Git commit 0e00a2295ca0f76738c72a068bca38e74057b0c2 by Harald Sitter.
Committed on 27/03/2024 at 00:15.
Pushed by sitter into branch 'master'.

packagekitresource: do not load dependencies on construction

there is a limit on how many transaction we can have, don't exhaust them
by querying dependencies of updates when we'll possibly not need the
information at all.

this restores the previous behavior of only requesting dependency
information when sizeDescription is called. to facilitate this change
the dependencies class now has a getter on whether dependencies are
loaded

M  +8    -1    libdiscover/backends/PackageKitBackend/PackageKitDependencies.cpp
M  +3    -1    libdiscover/backends/PackageKitBackend/PackageKitDependencies.h
M  +9    -6    libdiscover/backends/PackageKitBackend/PackageKitResource.cpp

https://invent.kde.org/plasma/discover/-/commit/0e00a2295ca0f76738c72a068bca38e74057b0c2
Comment 3 Harald Sitter 2024-03-27 00:33:47 UTC
Git commit 49a5ef9a5461d4d896e3928319f8b02b9a4c1f4b by Harald Sitter.
Committed on 27/03/2024 at 00:29.
Pushed by sitter into branch 'Plasma/6.0'.

packagekit: only resolve dependencies for resources in None state

there is little to no meaning to be gained from knowing the dependencies
of an installed package

(cherry picked from commit b605a442ed23675f152b3a0706d03e739c5fd6ba)

M  +4    -0    libdiscover/backends/PackageKitBackend/PackageKitResource.cpp

https://invent.kde.org/plasma/discover/-/commit/49a5ef9a5461d4d896e3928319f8b02b9a4c1f4b