Performance: late previous-playlist load
Nikolaj Hald Nielsen
nhnfreespirit at gmail.com
Wed Apr 14 15:34:39 CEST 2010
The _right_ solution for this, I think, is to expand on the proxy
loading pattern that is already used in some places (ampache tracks
for instance) and use this for loading _all_ types of tracks. What it
basically does is load an empty proxy track to the playlist, and then
asynchronously convert each track to the real one as data becomes
available.
- Nikolaj
On Wed, Apr 14, 2010 at 3:24 PM, Nanno Langstraat <langstr at gmail.com> 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 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