paulmcauley / klassy

Klassy is a highly customizable binary Window Decoration, Application Style and Global Theme plugin for recent versions of the KDE Plasma desktop.
843 stars 24 forks source link

Poor performance when using system icon theme with animations enabled #119

Closed Dejweed closed 8 months ago

Dejweed commented 8 months ago

Minimize, maximize/restore window effects become very sluggish when using system icon theme and having animations enabled (window decorations klassy settings). Disabling animations makes it smooth again.

Also, my laptop starts lagging when the mouse cursor hovers over these icons. Disabling animations doesn't make a difference. Changing button's icons fixes it (for example to redmond).

Tested on wayland.

paulmcauley commented 8 months ago

There was a change from using QIcon::fromTheme to KIconLoader to load system icons in order to get the CSS icon colours. I will double-check I have not done anything wrong, and if not I will switch it back...

paulmcauley commented 8 months ago

I assume you are using the Plasma 5 version? I think the performance may be OK on the Plasma 6 version but I would need to profile it.

paulmcauley commented 8 months ago

f5bdef3eab562b8824c4ebe6cc092be296b8f7ed seems to fix this. Let me know.

In f5bdef3eab562b8824c4ebe6cc092be296b8f7ed I changed to using the global KIconLoader object, rather than creating a local one. KIconLoader is weird.

paulmcauley commented 8 months ago

I made some further tweaks in 4807f8dde3b92e46a4886576ad4d02430fcc32f1 . My own (unoptimized) "force colourize" algorithm seems to perform better than KIconLoader's colourizing so I made force-colourizing the default again.

Dejweed commented 8 months ago

Now it works great, thank you!