Performance: late previous-playlist load

Mathias Panzenböck grosser.meister.morti at gmx.net
Wed Apr 14 23:51:08 CEST 2010


On 04/14/2010 03:24 PM, Nanno Langstraat wrote:
> Something that irks me about starting Amarok is the long delay before
> the MainWindow shows, particularly if you have a large playlist.
>
> When I start Amarok on my "Media" virtual desktop, I can't switch to my
> "Work" virtual desktop to do something useful until MainWindow shows and
> X11 locks it to the right virtual desktop. That takes 13 seconds; an
> annoyance.

I added a window-specific kwin setting for the window class "amarok" and
force it to the 4th desktop. So I can start it where ever I want, the
window will be put on the 4th desktop. :)

But it would be nice to load the playlist in a background thread and just
block the playlist (with a loading animation) instead of the whole amarok
window.

	-panzi

>
> I did an experiment a while ago where the previous playlist was loaded
> on a QTimer::singleShot() instead of during the constructors.
>
> I think that with a recent patch from Nikil Marathe / Nikolaj, Amarok
> now contains all the patches necessary to do that.
>
>
> ----
> Timings: with my 8000-track playlist, the time for MainWinow to show
> goes from 13 to 3.5 seconds, which is "tolerable" territory.
>
> MainWindow then "freezes" (stays blank) for 9 seconds while it loads the
> playlist, but I'm liberated to do something else.
>
> Could keep the Splash Screen up during that time. Future elaboration:
> load the playlist in a background thread.
>
>
> ----
> Some minor points:
>
>     * The QTimer call needs to go at the end of 'App::continueInit()' in
>       App.cpp.
>       If you start the QTimer in PlaylistActions, it triggers too soon.
>
>     * It allows us to get rid of some constructor ordering trickery,
>       e.g. forced early init of The::playlistManager().
>
>     * In Dynamic Playlist mode, new tracks will be chosen before
>       'restoreDefaultPlaylist()' gets the chance to run.
>
>
>
> ----
> What do you think of this?
>
>      Cheers,
>      Nanno
>
>
>
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel



More information about the Amarok-devel mailing list