Bug 403314 - screenlocker configuration module has poor performance if not started from system settings
Summary: screenlocker configuration module has poor performance if not started from sy...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcmshell (show other bugs)
Version: 5.14.4
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-17 16:25 UTC by Gianni
Modified: 2019-01-22 12:39 UTC (History)
1 user (show)

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


Attachments
Video showing difference between opening with systemsettings5 and standalone (2.46 MB, video/x-matroska)
2019-01-17 16:25 UTC, Gianni
Details
qdbus org.kde.KWin /KWin supportInformation (4.41 KB, text/plain)
2019-01-17 16:26 UTC, Gianni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gianni 2019-01-17 16:25:57 UTC
Created attachment 117512 [details]
Video showing difference between opening with systemsettings5 and standalone

SUMMARY

When I try to set a wallpaper for the lock-screen, if I access the screenlocker module from system settings I can choose an image normally, but if I start the screenlocker module "standalone" (eg. from the command line or from krunner) and select the "Aspect" tab when I try to resize it or scroll it, it shows severe ""redrawing"" problems.

STEPS TO REPRODUCE
1. Open terminal and execute "kcmshell5 screenlocker"
2. Select "Aspect" tab
3. Try to resize the window or scroll through the images

OBSERVED RESULT
The screenlocker window doesn't redraw itself like it does when accessed from the system settings.

EXPECTED RESULT
The screenlocker module opened standalone should redraw itself as good as it does when opened from system settings.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Manjaro Linux
KDE Plasma Version: Plasma 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.12.0

ADDITIONAL INFORMATION
I am appending a video showing the described issue (note: the window gets updated eventually, it was just taking too long so I cut the video)
Comment 1 Gianni 2019-01-17 16:26:58 UTC
Created attachment 117513 [details]
qdbus org.kde.KWin /KWin supportInformation
Comment 2 Gianni 2019-01-17 16:35:12 UTC
Forgot to add that I am using software plasma renderer.
Comment 3 Nate Graham 2019-01-18 21:39:54 UTC
1. Is it just the screenlocker KCM that exhibits this problem, or other KCMs too?
2. Do you see the problem if you use Sidebar view instead of icons view for the System Settings app itself?
Comment 4 Gianni 2019-01-19 00:55:32 UTC
(In reply to Nate Graham from comment #3)
> 1. Is it just the screenlocker KCM that exhibits this problem, or other KCMs
> too?
> 2. Do you see the problem if you use Sidebar view instead of icons view for
> the System Settings app itself?
1. Looking through other KCMs I can effectively confirm that at least "Look and Feel","Desktop Theme", "Cursor Theme", "Splash Screen" (all accessible from "Workspace Theme" inside system settings) and "Icons" are also affected by the same problem.
2. I do not see the problem using sidebar or tree view for the system settings.
Comment 5 Nate Graham 2019-01-19 03:19:34 UTC
Strange!
Comment 6 Gianni 2019-01-19 14:25:49 UTC
I discovered something.
When I resize the kcm modules from system settings (so the one that is currently redrawing the window with good responsiveness), there is a big memory leak.
When I open System Settings and go to the "Workspace Theme" section (therefore I opened one of the problematic kcm modules), it occupies 47MB of ram. Then I start to resize the window continuously for 5 seconds: the systemsettings5 process now occupies 375MB of ram.
It basically sky rockets the more I keep resizing.
This fast leak happens on the kcm modules aforementioned.
This does NOT happen when I open the kcm modules standalone (in that case it's the cpu going to 50% usage -> so 1 core to 100%, since I got 2).

Although the leak I described above is by far the most aggressive, I noted that if I try to keep resizing other non affected kcm modules (both from system settings and standalone mode), or a newly opened system settings window, I still see a ram leak: a newly opened system settings window occupies around 28MB of ram, if I keep resizing it for 5 seconds it gets to 52MB of ram.
Comment 7 David Edmundson 2019-01-22 12:39:57 UTC
Git commit e8fe68581741f375c1b1d73e10c42bf41e4c2f9a by David Edmundson.
Committed on 22/01/2019 at 12:39.
Pushed by davidedmundson into branch 'Plasma/5.15'.

Load Plasma QtQuick settings in KCMShell

Summary:
FIXED-IN: 5.15.0

Test Plan:
Clone of code used in systemsettings etc.
Compiles

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18443

M  +1    -0    CMakeLists.txt
M  +1    -0    kcmshell/CMakeLists.txt
M  +2    -0    kcmshell/main.cpp

https://commits.kde.org/kde-cli-tools/e8fe68581741f375c1b1d73e10c42bf41e4c2f9a