Review Request: Improve Style KCM loading time by delaying the Desktop (Plasma) Themes load

Ben Cooksley sourtooth at gmail.com
Sat Mar 20 20:42:20 CET 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3322/#review4587
-----------------------------------------------------------

Ship it!


Excellent, solves bug #222745

- Ben


On 2010-03-20 13:16:11, Darío Andrés wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3322/
> -----------------------------------------------------------
> 
> (Updated 2010-03-20 13:16:11)
> 
> 
> Review request for kdelibs and Plasma.
> 
> 
> Summary
> -------
> 
> Currently the Style KCM takes a few seconds to be started because it loads (from start, and twice) the Workspace (Plasma Themes)
> As I sometimes want to only change the Application Widget Style, this load doesn't seem necessary and it consumes time. (it also causes a delay when loading "Appearance" on SystemSettings)
> 
> In order to avoid that I propose to load the desktop themes only after the "Workspace" tab is clicked.
> 
> I have tested different approaches to not block the UI, but they don't seem to be nice code.
> So, the GUI will be blocked for a while, but as we are using QTimer::singleShot(100, ..., loadDesktopTheme), the GUI will be draw a first time, and then the themes will be loaded.
> To improve the situation a bit more, I also set the cursor to "waiting" until the themes are loaded and appear on the list
> (I was wondering if we could add a label or something saying "Loading themes" .. or if the whole situation is self-explanatory (busy cursor))
> 
> I also removed a call which loaded the themes when ThemeModel was created, because that will cause the themes to be loaded twice (taking 1.5~2x time)
> 
> [[In our future plans we wanted to split the Workspace theme to its own KCM, but until we do this (and if we ever do it), this seems like a nice improvement]]
> 
> 
> Diffs
> -----
> 
>   svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/workspace/kcontrol/style/kcmstyle.h 1105269 
>   svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/workspace/kcontrol/style/kcmstyle.cpp 1105269 
> 
> Diff: http://reviewboard.kde.org/r/3322/diff
> 
> 
> Testing
> -------
> 
> No regressions so far
> The overall KCM startup time decreased a lot
> The blocked UI doesn't seem "blocked" as it is properly drawn a first time, and the busy cursor is shown
> 
> Was there an alternative to "QTimer::singleShot" just to perform a queued slot call ?
> 
> 
> Thanks,
> 
> Darío
> 
>



More information about the Plasma-devel mailing list