Bug 417850 - "Application style" kcm causes high cpu usage if third-party styles are installed
Summary: "Application style" kcm causes high cpu usage if third-party styles are insta...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_style (show other bugs)
Version: 5.26.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-02-18 23:22 UTC by Patrick Silva
Modified: 2023-01-30 17:49 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6


Attachments
screenshot (899.25 KB, image/png)
2020-02-18 23:22 UTC, Patrick Silva
Details
cpu usage before qsvgstyle to be installed (224.99 KB, image/png)
2020-04-06 13:19 UTC, Patrick Silva
Details
cpu usage after qsvgstyle to be installed (201.91 KB, image/png)
2020-04-06 13:20 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-02-18 23:22:05 UTC
Created attachment 126146 [details]
screenshot

SUMMARY
As we can see in the attached screenshot, "Application style" kcm uses ~30% of my cpu.
It occurs on both X11 and Wayland sessions.

Operating System: Arch Linux 
KDE Plasma Version: 5.18.1
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Kernel Version: 5.5.4-arch1-1
OS Type: 64-bit
Processors: 2 × Intel® Celeron® CPU G1820 @ 2.70GHz
Memory: 7,7 GiB of RAM
Comment 1 Filip Fila 2020-02-19 19:54:47 UTC
Can't reproduce, tried sidebar mode, icon view, and standalone kcm in X11.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.1
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 2 Nate Graham 2020-02-20 23:55:09 UTC
Also cannot reproduce.
Comment 3 Michael D 2020-04-06 06:38:27 UTC
Can reproduce depending on what themes are installed. After installing qsvgstyle from AUR the kcm causes over 100% CPU usage in top. Removing qsvgstyle and its themes brings the CPU usage back to normal.
Comment 4 Patrick Silva 2020-04-06 13:19:44 UTC
Created attachment 127322 [details]
cpu usage before qsvgstyle to be installed

qsvgstyle s not installed on my Arch Linux.
I have just installed it on Neon unstable and now such system is also affected.
Compare the attached screenshots.

https://github.com/DexterMagnific/QSvgStyle

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Comment 5 Patrick Silva 2020-04-06 13:20:15 UTC
Created attachment 127323 [details]
cpu usage after qsvgstyle to be installed
Comment 6 Kai Uwe Broulik 2020-04-06 14:42:27 UTC
Can confirm with the style. It appears to be in a repaint loop. We get a UpdateRequest, schedule a repaint, render the widget, which somehow gives us another UpdateRequest and then we're in a loop.

It doesn't happen when I don't have a HBox/VBoxLayout on the widget preview but other than that I have no idea what's going on in that style.
Comment 7 Bug Janitor Service 2023-01-26 12:02:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2543
Comment 8 Fushan Wen 2023-01-30 17:49:44 UTC
Git commit c48eda8b2a44dfa2a8e44e81874571e375117040 by Fushan Wen.
Committed on 30/01/2023 at 17:48.
Pushed by fusionfuture into branch 'master'.

kcms/style: suppress update requests from preview widget

When mouse is not above a preview item, set the update interval to 1s.
FIXED-IN: 6

M  +29   -1    kcms/style/previewitem.cpp
M  +4    -0    kcms/style/previewitem.h

https://invent.kde.org/plasma/plasma-workspace/commit/c48eda8b2a44dfa2a8e44e81874571e375117040