https://bugs.kde.org/show_bug.cgi?id=511265

--- Comment #6 from Vlad Zahorodnii <[email protected]> ---
Git commit 073925b67253d6432c799f4475faa5d073a29347 by Vlad Zahorodnii.
Committed on 06/11/2025 at 17:04.
Pushed by vladz into branch 'master'.

wallpapers/image: Fix high cpu usage when wallpaper dialog is open

The title and the author records are cached. But cache is not the right
abstraction for storing such information because more than 10 wallpapers
can be shown at the same time, which can trigger a feedback loop:
query metadata for an image => evacuate some metadata from a cache to
make space for the just loaded metadata => query metadata for an image
whose metadata has been just released (for example if the view side
wants it again) and so on.

This change makes the wallpaper model store background metadata in hash
tables in order to address high CPU usage.

M  +15   -24   wallpapers/image/plugin/model/abstractimagelistmodel.cpp
M  +2    -8    wallpapers/image/plugin/model/abstractimagelistmodel.h
M  +7    -9    wallpapers/image/plugin/model/imagelistmodel.cpp
M  +0    -1    wallpapers/image/plugin/model/packagelistmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/073925b67253d6432c799f4475faa5d073a29347

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to