Bug 466541 - Really slow Flatpak permission page loading
Summary: Really slow Flatpak permission page loading
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_flatpak (show other bugs)
Version: 5.27.1
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 16:00 UTC by Henning
Modified: 2023-03-17 13:46 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning 2023-02-27 16:00:25 UTC
SUMMARY
When opening the flatpak permissions overview page, it loads very slow. It seems all permissions of all apps are loaded even on the overview. This makes it unable to perform well on low resources. It also wastes a useful space to educate about flatpak permissions.

STEPS TO REPRODUCE
1. open the Flatpak permission overview

OBSERVED RESULT
The overview loads very slow. I cant imagine this is just a "flatpak list", which takes about 1s to load. Probably lots of settings are already loaded, which is not efficient.

EXPECTED RESULT
The settings should only be loaded when you click on an apps entry. Otherwise an empty field, maybe containing a short explanation of Flatpak permissions could be shown.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 37
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.13-200.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 Harald Sitter 2023-02-28 11:18:04 UTC
How many flatpaks do you have installed? And which ones.
Comment 2 Henning 2023-02-28 11:40:23 UTC
I have nearly all my apps as flatpaks. 175 packages currently, 112 apps, usual ones like Firefox, VLC, Wine, XNView, Calibre, ...

Yes I see this is a lot, but dont know, the loading is still stuttering when scrolling through them, as if they were not cached correctly or something else.
Comment 3 Harald Sitter 2023-02-28 12:30:28 UTC
Yeah, not surprising, nobody probably tested with that many flatpaks :)
Comment 4 Henning 2023-02-28 13:24:39 UTC
But do you know if there is such a problem as preloading of settings e.g.? Could there be some tweak?

My laptop is rather old but intermediate. I think a goal could be to make KDE as power efficient as possible.
Comment 5 Harald Sitter 2023-02-28 13:31:32 UTC
It should work with any number of flatpaks yes, as for why it doesn't right now I can't say.
Comment 6 Harald Sitter 2023-02-28 14:47:05 UTC
I think we'll need a list of all installed applications. So far I'm unable to reproduce this, in fact even reducing the disk bandwith to 500KiB results in no noticable slowdown. Indeed from looking at the code I don't know why it would be slow.

Are you by any chance able to build software manually? We may need to patch in some ad-hoc diagnostics.
Comment 7 Harald Sitter 2023-02-28 20:54:21 UTC
Also, in case you are able to use https://github.com/KDAB/hotspot it'd be amazing if you could get a recording of your problem.
Comment 8 Bug Janitor Service 2023-03-15 03:45:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Henning 2023-03-15 18:15:53 UTC
Hi, sorry for not responding. I used hotspot and will submit my data
Comment 10 Henning 2023-03-15 19:02:32 UTC
Here is a flamegraph https://cloud.uol.de/s/JPXwNBFSNipLNAj

Surprisingly it seems to be fixed, the settings launch normally fast, what you can expect inclusing icons e.g.
Comment 11 Harald Sitter 2023-03-17 12:59:18 UTC
So, the bug is fixed then?