Bug 513697

Summary: Overview Application Search considerably slower than KRunner
Product: [Plasma] kwin Reporter: Niklas Stephanblome <notify>
Component: effects-overviewAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate, nicolas.fella
Priority: NOR Keywords: efficiency-and-performance
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Niklas Stephanblome 2025-12-22 12:00:49 UTC
SUMMARY
When searching for an application in Overview, the results appear considerably slower than when searching with KRunner. Other PlasmaSearch entries (e.g. calculator result) are fast as usual. On my system, that has a rather large number of .desktop file entries, I have to wait a good 3 seconds (!) for the results to appear, with KRunner they are instant. While on clean installations, the wait time is maybe 0.5 seconds but this is still considerably more than KRunner's instant results. 

STEPS TO REPRODUCE
1. Pick any distribution with a recent version of KDE Plasma (I tested Arch, Kubuntu, Kali, KDE Neon). X11 and Wayland are both affected.
2. Activate the Overview effect
3. Search for an app that is not currently open

OBSERVED RESULT
There is always at least a slight delay before the results appear. On a cluttered system this delay quickly adds up, although it is present on clean systems too.
When it's especially slow (e.g. on my main system), the results will disappear with every keystroke

EXPECTED RESULT
The results appear just as fast as they would in KRunner (effectively immediately). This was the case for a long time. I cannot verify exactly when but an ISO I have from January 2024 works as expected (and faster than any current installation of KDE)

WHAT I HAVE TRIED SO FAR / MORE INFO:
- it does NOT appear to be affected by disk speed (tested with a ramdisk)
- it does appear to be affected by the number of .desktop files
Comment 1 Nate Graham 2025-12-22 18:14:40 UTC
It's not as extreme for me, but I can reproduce the issue.
Comment 2 Bug Janitor Service 2026-01-31 12:32:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6245
Comment 3 Harald Sitter 2026-02-01 22:16:14 UTC
Git commit a00f69c61d23c6dee8f3ab887b303020674572b0 by Harald Sitter.
Committed on 01/02/2026 at 22:15.
Pushed by sitter into branch 'master'.

servicerunner: do not repeat allocate PatternMasks

since this is a heap variable the allocation is much more expensive than
when this code was originally written. to mitigate we now thread_local
the mask so we only allocate it once.
Related: bug 514698

M  +4    -3    runners/services/bitap.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/a00f69c61d23c6dee8f3ab887b303020674572b0
Comment 4 Bug Janitor Service 2026-02-01 22:17:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6247
Comment 5 Bug Janitor Service 2026-02-05 01:59:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6254
Comment 6 Nate Graham 2026-02-05 02:20:38 UTC
Git commit b4ef507412f4766f8a9932637ef2751ec34072d1 by Nate Graham.
Committed on 05/02/2026 at 01:59.
Pushed by ngraham into branch 'Plasma/6.6'.

servicerunner: do not repeat allocate PatternMasks

since this is a heap variable the allocation is much more expensive than
when this code was originally written. to mitigate we now thread_local
the mask so we only allocate it once.
Related: bug 514698


(cherry picked from commit a00f69c61d23c6dee8f3ab887b303020674572b0)

Co-authored-by: Harald Sitter <sitter@kde.org>

M  +4    -3    runners/services/bitap.h

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