--===============0942391615259769064== Content-Type: multipart/alternative; boundary="===============2968997115171115530==" --===============2968997115171115530== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/112417/#review39570 ----------------------------------------------------------- Ship it! Looks good to me. - Mark Kretschmann On Aug. 31, 2013, 7:16 p.m., Frank Meerkoetter wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/112417/ > ----------------------------------------------------------- > > (Updated Aug. 31, 2013, 7:16 p.m.) > > > Review request for Amarok. > > > Description > ------- > > Using callgrind it was very visible that amarok is spending an enormous amount of time to turn podcast episodes into tracks. > > Initially i noticed that the PlaylistBrowserModel is calling Playlist::tracks().count() while it should be calling Playlist::trackCount(). > Constructing a list of tracks is expensive for the case of Podcasts (as internally podcast episodes are converted into tracks which > get added to a new list). This change already improved the situation a bit, but the UI was still sluggish. Callgrind was still showing > that we are turning episodes into tracks - over and over. > > To fix that i added a cache to the PodcastChannel. As long as the episodes haven't changed, there is no point in constructing > a new list of tracks each time tracks() is called. > > With that second fix the UI is now pretty useable. > > > Diffs > ----- > > src/browsers/playlistbrowser/PlaylistBrowserModel.cpp 281694a > src/core-impl/podcasts/sql/SqlPodcastMeta.h 02a18d3 > src/core-impl/podcasts/sql/SqlPodcastMeta.cpp 20bcaff > > Diff: http://git.reviewboard.kde.org/r/112417/diff/ > > > Testing > ------- > > Tested with http://www.justing.com.cn/justpod/justpod_ch.xml > > > Thanks, > > Frank Meerkoetter > > --===============2968997115171115530== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/112417/

Ship it!

Looks good to me.

- Mark


On August 31st, 2013, 7:16 p.m. UTC, Frank Meerkoetter wrote:

Review request for Amarok.
By Frank Meerkoetter.

Updated Aug. 31, 2013, 7:16 p.m.

Description

Using callgrind it was very visible that amarok is spending an enormous amount of time to turn podcast episodes into tracks.

Initially i noticed that the PlaylistBrowserModel is calling Playlist::tracks().count() while it should be calling Playlist::trackCount().
Constructing a list of tracks is expensive for the case of Podcasts (as internally podcast episodes are converted into tracks which
get added to a new list). This change already improved the situation a bit, but the UI was still sluggish. Callgrind was still showing
that we are turning episodes into tracks - over and over.

To fix that i added a cache to the PodcastChannel. As long as the episodes haven't changed, there is no point in constructing
a new list of tracks each time tracks() is called.

With that second fix the UI is now pretty useable.

Testing

Tested with http://www.justing.com.cn/justpod/justpod_ch.xml

Diffs

  • src/browsers/playlistbrowser/PlaylistBrowserModel.cpp (281694a)
  • src/core-impl/podcasts/sql/SqlPodcastMeta.h (02a18d3)
  • src/core-impl/podcasts/sql/SqlPodcastMeta.cpp (20bcaff)

View Diff

--===============2968997115171115530==-- --===============0942391615259769064== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel --===============0942391615259769064==--