Bug 455780 - WindowHeap-based effects are slightly slower to activate than previous versions
Summary: WindowHeap-based effects are slightly slower to activate than previous versions
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-window-management (show other bugs)
Version: 5.25.1
Platform: Arch Linux Linux
: HI minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 453221 459281 462608 465419 469446 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-22 10:21 UTC by Phos
Modified: 2023-12-14 18:06 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phos 2022-06-22 10:21:34 UTC
SUMMARY
The new QML effects like overview, present-windows, desktop grid are noticeably slower to activate.

STEPS TO REPRODUCE
1. Trigger present-windows

OBSERVED RESULT
The effect activates slower (there is a delay between pressing the button to the effect displaying.)

EXPECTED RESULT
The effect should trigger instantly

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.18.5-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-06-22 16:29:28 UTC
Can confirm.
Comment 2 Nate Graham 2022-09-08 19:58:52 UTC
It's become faster recently, but the small delay is still there.
Comment 3 Nate Graham 2022-09-22 17:22:09 UTC
*** Bug 459281 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2022-09-22 17:22:44 UTC
*** Bug 453221 has been marked as a duplicate of this bug. ***
Comment 5 Phos 2022-10-22 09:45:39 UTC
It seems to have gotten worse again in 5.26. The new animation curves are nice though. Still a very noticeable lag between pressing the button and the animation.
Another issue with 5.26 is that the animation never plays again when you activate the effects multiple times. For example, the Present Windows effect just doesn't play when you press the activation button multiple times.
Comment 6 Phos 2022-10-22 12:52:22 UTC
It takes the animation so long to activate that I have already released the key. Its pretty jarring how slow it is to activate.
Comment 7 Nate Graham 2022-12-05 20:00:20 UTC
*** Bug 462608 has been marked as a duplicate of this bug. ***
Comment 8 guimarcalsilva 2023-01-30 22:34:57 UTC
On a 6th gen i5 it takes around 4 seconds to activate the overview effect the first time, however, that only happens the first time. All subsequent activations work fine. I wonder if it would be possible to preload the active effects when the session starts.
Comment 9 Nate Graham 2023-02-07 20:08:24 UTC
*** Bug 465419 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2023-05-15 18:17:10 UTC
*** Bug 469446 has been marked as a duplicate of this bug. ***
Comment 11 Alex A.D. 2023-05-15 19:23:10 UTC
I wish devs deliver previous version of the present-windows but they responded on reddit that they won't. New present-effects version is a complete regression in terms of perfromance, usability and configurability.

If anyone is interested in compiling old version please let me know.
Comment 12 Lyubomir 2023-05-20 14:00:20 UTC Comment hidden (spam)
Comment 13 Lyubomir 2023-05-20 14:03:13 UTC Comment hidden (spam)
Comment 14 Nate Graham 2023-05-20 14:20:00 UTC Comment hidden (spam)
Comment 15 Alex A.D. 2023-05-21 19:58:20 UTC
(In reply to Lyubomir from comment #12)
> I think this also affects the Application Launcher. This is a very big issue, waiting for 1-3 seconds before it appearing...

I don't use Application Launcher so I can't confirm or disprove this. I use desktop grid and it works perfectly. Quite fast.
Comment 16 David Edmundson 2023-11-23 09:07:32 UTC
*** Bug 455585 has been marked as a duplicate of this bug. ***
Comment 17 Bug Janitor Service 2023-12-07 20:48:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4768
Comment 18 Vlad Zahorodnii 2023-12-08 10:31:03 UTC
Git commit f1ff706b3b1e769eaf67c4a5042e522edc286ab3 by Vlad Zahorodnii.
Committed on 08/12/2023 at 11:21.
Pushed by vladz into branch 'master'.

scripting: Cache WindowThumbnail textures

Effects like overview can create more than one thumbnail for the same
window. For example, if you have 4 virtual desktops, the overview is
going to create 9 window thumbnails for the desktop background, which in
its turn means that each thumbnail is going to have its own texture.
That's not great.

WindowThumbnailItem.sourceSize has been dropped because it's unused and
will complicate texture caching.

M  +156  -147  src/scripting/windowthumbnailitem.cpp
M  +37   -18   src/scripting/windowthumbnailitem.h

https://invent.kde.org/plasma/kwin/-/commit/f1ff706b3b1e769eaf67c4a5042e522edc286ab3
Comment 19 Vlad Zahorodnii 2023-12-08 13:48:58 UTC
Git commit eb13085de2173cb31dbb645725462d5cefadb213 by Vlad Zahorodnii.
Committed on 08/12/2023 at 14:40.
Pushed by vladz into branch 'master'.

plugins/overview: Load screen delegate asynchronously

The compilation step still takes a significant amount of time on the
first launch. On my machine, it's around 1s. Even if it happens just
once, freezing the session for 1 second is not great.

This change makes the overview effect load main.qml asynchronously
when plasma session starts. By the time the session is loaded, it should
be ready.

M  +4    -0    src/effect/quickeffect.cpp
M  +8    -1    src/plugins/overview/overvieweffect.cpp

https://invent.kde.org/plasma/kwin/-/commit/eb13085de2173cb31dbb645725462d5cefadb213
Comment 20 Vlad Zahorodnii 2023-12-12 15:31:00 UTC
Git commit ef2c4e201e2f062798068b728066630bf5ff85de by Vlad Zahorodnii.
Committed on 12/12/2023 at 16:21.
Pushed by vladz into branch 'master'.

plugins/overview: Load milou on demand

Milou.ResultsView loads runners regardless whether the query string is
empty. It's not clear what milou should do. There are valid arguments
both in favor and against preloading runners.

This change puts Milou.ResultsView behind a Loader so milou is loaded
when it's actually needed and not when starting overview.

M  +10   -5    src/plugins/overview/qml/main.qml

https://invent.kde.org/plasma/kwin/-/commit/ef2c4e201e2f062798068b728066630bf5ff85de
Comment 22 Nate Graham 2023-12-14 18:06:35 UTC
This is massively improved for me now; well within the range of the snappiness of the old C++ based effects for me, even when the system is under load. Let's call it fixed now!