Emoji picker (`M-.`, `plasma-emojier`) is slow to start. It takes roughly 500ms between clicking the shortcut/starting the command in terminal, and the GUI window appearing. This is a very noticeable, flow-breaking delay. This is on a rather powerful desktop (i7-12700H, 1920x1080 display) ``` λ plasma-emojier --version plasma.emojier 5.27.4 fish: Job 1, 'plasma-emojier --version' terminated by signal SIGSEGV (Address boundary error) ``` (sefault on version doesn't bother me :0)
If you run `plasma-emojier` in a terminal window, is it significantly faster to launch, or about the same? This will help us understand whether the issue is caused by the app itself being slow to launch, or whether the slowdown comes from the overhead of the global shortcut infrastructure.
It’s slow either way, and other global shortcuts are pretty snappy
Ok, then it's the app. FWIW it's pretty snappy for me with weaker hardware (i7-10510U). I can't reproduce any perceived slowness.
Here's a firefox profile for `perf record` https://share.firefox.dev/3ZQGasY There's no symbols, but there's something taking 500ms there
Got symbols: https://share.firefox.dev/401bncW It's pretty curious... Looks like the blame is actually on the NixOS wrapper script, which doesn't look at all reasonable: https://gist.github.com/matklad/a32bd2fc34bdb7edd37947d8d4619b35 I'll ask on nixos discourse what's up with that: * either NixOS is doing something stupid there, * or perhaps there's something lacking with plasma's dynamic linking/search path, which forces Nix to do a poorly perfoming work-aroud
https://discourse.nixos.org/t/plasma-emojier-is-very-slow/27160
Taking a further look here, it seems like the slowness was the result of three independent causes: * NiXOS quadratic QT_PLUGIN_PATH manipulation (I've eliminated it by constructing the right path myself) * _Something_ in nvidia driver taking a lot of time to great a GL Context (eliminated that by switching to Intel) * Residual slowness in emojier itself With the first two issues fixed, the perf is improved to the point where it is not outright noticeable sluggish, but still doesn't quite feel instant. Though, at this point it is probably good enough. If anyone wants to poke at it, here's a profile: https://share.firefox.dev/3UqtTKC
*** Bug 468386 has been marked as a duplicate of this bug. ***
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1469
Git commit 24cce71ecc3167641f41fafe4da1a55ae1ece44d by Fushan Wen. Committed on 11/04/2023 at 17:29. Pushed by fusionfuture into branch 'Plasma/5.27'. emojier: enable asynchronous loading in Instantiator 1. Using incubateObject to create GlobalDrawer greatly improves the startup time. 2. Enable asynchronous loading in Instantiator, and update drawer.actions only when all actions are loaded. This reduces binding updates, hence further reduces the startup time. FIXED-IN: 5.27.5 M +0 -16 emojier/app/ui/CategoryAction.qml M +1 -1 emojier/app/ui/CategoryPage.qml M +70 -28 emojier/app/ui/emojier.qml https://invent.kde.org/plasma/plasma-desktop/commit/24cce71ecc3167641f41fafe4da1a55ae1ece44d
Git commit ffc8da9b4c4791a3dd662069eddb0be4c36cfcbc by Fushan Wen. Committed on 11/04/2023 at 17:32. Pushed by fusionfuture into branch 'master'. emojier: enable asynchronous loading in Instantiator 1. Using incubateObject to create GlobalDrawer greatly improves the startup time. 2. Enable asynchronous loading in Instantiator, and update drawer.actions only when all actions are loaded. This reduces binding updates, hence further reduces the startup time. FIXED-IN: 5.27.5 (cherry picked from commit 24cce71ecc3167641f41fafe4da1a55ae1ece44d) M +0 -16 emojier/app/ui/CategoryAction.qml M +70 -28 emojier/app/ui/emojier.qml https://invent.kde.org/plasma/plasma-desktop/commit/ffc8da9b4c4791a3dd662069eddb0be4c36cfcbc
> If you run `plasma-emojier` in a terminal window, is it significantly faster to launch, or about the same? > It’s slow either way, and other global shortcuts are pretty snappy Spoke too soon @nate! After testing this patch, I found out that global shortcuts are also slow (global _application_ shortcut adds an extra 100ms delay in comparison to launching taskbar entry with the same shortcut). See https://bugs.kde.org/show_bug.cgi?id=468440
Also confirm that with * NixOS [patch](https://github.com/NixOS/nixpkgs/pull/225881) applied * emojier [patch](https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1469) applied * and using task manager shortcut, rather than M+. plasma-emojier finally feels snappy enough for me! Thanks!