Bug 489396 - FPS drops vastly when switching virtual desktops with many opened windows so that the panel floats or de-floats
Summary: FPS drops vastly when switching virtual desktops with many opened windows so ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: performance (show other bugs)
Version: 6.1.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 18:44 UTC by postix
Modified: 2024-07-19 13:45 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2024-06-28 18:44:32 UTC
STEPS TO REPRODUCE
1.  Two Virtual Desktops + a floating panel
2.  On one desktop open many windows, the more, the stronger is the effect.
18 windows were a good number for me to make it very obvious. This may depend also on your hardware.
Let at least one window touch the panel so that it de-floats.
3. Switch between the two virtual desktops

OBSERVED RESULT
The framerate drops to < 10 for me.

EXPECTED RESULT
The framerate stays around 60 fps.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240627
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Comment 1 postix 2024-06-28 18:49:50 UTC
My guess is that the underlying code uses some expensive routine to adjust the new positions continuously of each window individually when the panel de-floats, adding up to many CPU cycles.
Comment 2 postix 2024-06-28 20:45:38 UTC
> Proper async resizing
> The panel resizes when contents change, it doesn't know it's constrained until after it did the resize. It may get configure sent back, it may not.
> Between the client wanting to resize and getting configured rendering any frames will be wrong. We cannot inhibit frames in the client without knowing when to inhibit and stop inhibiting. I'm convinced we need something like xdg_popup.reposition
https://invent.kde.org/plasma/kwin/-/issues/229#note_979763 related?
Comment 3 Nate Graham 2024-07-19 13:36:22 UTC
This appears to be fixed for me in current git master, likely due to the floating panel refactor work recently.

However please do feel free to re-open it if you find it's still a problem after upgrading to Plasma 6.2. Thanks!
Comment 4 postix 2024-07-19 13:45:38 UTC
\o/ thanks, otherwise will do so!