Bug 477138 - Application Launcher slow and laggy when Discover not installed
Summary: Application Launcher slow and laggy when Discover not installed
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-17 12:17 UTC by pixelplanetdev
Modified: 2023-11-19 21:22 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
laggy launcher (1.99 MB, video/webm)
2023-11-18 15:37 UTC, pixelplanetdev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pixelplanetdev 2023-11-17 12:17:21 UTC
If i install Plasma 6 workspace, but without Discover, using the application launcher becomes slow and hovering over a category takes two seconds till the applications to the right updates.

While doing this, the log gets flooded with many lines of

"plasmashell[7592]: kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/appstream" not found"

No such issue exists in Plasma 5 without Discover.


STEPS TO REPRODUCE
1.  add discover to ignore-modules line in ~/kde/src/kdesrc-build/kf6-workspace-build-include
2. kdesrc-build workspace, install and run
3.  use Application Launcher

Alternatively, if already built with discover, remove its files according to ~/kde/build/discover/install_manifest.txt

OBSERVED RESULT
Menu is slow in showing applications

EXPECTED RESULT
Menu should be as fast as with Discover
Comment 1 pixelplanetdev 2023-11-17 12:25:04 UTC
Operating System: Fedora Linux 39
KDE Plasma Version: 5.81.0
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.5.11-300.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630
Comment 2 Alexander Lohnau 2023-11-18 03:22:23 UTC
I am not sure what you mean with hovering over a category.

    if (mime.isEmpty()) {
        if (!mimeType.startsWith(QLatin1String("x-scheme-handler/"))) { // don't warn for unknown scheme handler mimetypes
            qCWarning(SERVICES) << "KApplicationTrader: mimeType" << mimeType << "not found";
            return lst; // empty
        }
        mime = mimeType;
    }

There is code in KServie to avoid lots of warnings, but in case the schema handler is known to QMimeDatabase, but (for whatever reason) not to KService internally, we will emit a warning later on.
Comment 3 pixelplanetdev 2023-11-18 15:37:03 UTC
Created attachment 163268 [details]
laggy launcher
Comment 4 pixelplanetdev 2023-11-18 15:41:31 UTC
(In reply to Alexander Lohnau from comment #2)
> I am not sure what you mean with hovering over a category.
> 
>     if (mime.isEmpty()) {
>         if (!mimeType.startsWith(QLatin1String("x-scheme-handler/"))) { //
> don't warn for unknown scheme handler mimetypes
>             qCWarning(SERVICES) << "KApplicationTrader: mimeType" <<
> mimeType << "not found";
>             return lst; // empty
>         }
>         mime = mimeType;
>     }
> 
> There is code in KServie to avoid lots of warnings, but in case the schema
> handler is known to QMimeDatabase, but (for whatever reason) not to KService
> internally, we will emit a warning later on.

I mean to just move the cursor over the categories in the launcher to see the applications. I attached a video showing it.
The CPU usage of plasmashell is high during it, and if you do any minor task in the background, like watching a video, it gets much slower, up to two seconds till the applications show.

This doesn't happen when Discover is installed. Or it's at least much much better.
Comment 5 Bug Janitor Service 2023-11-18 16:50:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3556
Comment 6 Nicolas Fella 2023-11-19 20:11:05 UTC
Git commit 807049da4acc18b5a771142332ed6ad1d55e4478 by Nicolas Fella.
Committed on 19/11/2023 at 20:58.
Pushed by nicolasfella into branch 'master'.

[kicker/kickoff] Remove unneeded check for appstream handler

When KApplicationTrader::preferredService returns no service we ask KIO whether appstream is a known protocol

This is expensive and unnecessary, we already know there is no app that can open appstream URLs because KApplicationTrader did not return one

M  +1    -3    applets/kicker/plugin/actionlist.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/807049da4acc18b5a771142332ed6ad1d55e4478
Comment 7 Andreas G 2023-11-19 21:22:13 UTC
That was fast,
Thanks a lot