[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-devel
Subject:    Re: Review Request 112417: FIX: 283022 - Performance with large feed (6000 items) very poor
From:       "Mark Kretschmann" <kretschmann () kde ! org>
Date:       2013-09-08 9:20:07
Message-ID: 20130908092007.16045.56192 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
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
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px \
#c9c399 solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/112417/">http://git.reviewboard.kde.org/r/112417/</a>
  </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Looks good to me.</pre>  <br />









<p>- Mark</p>


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








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px \
black solid;">  <tr>
  <td>

<div>Review request for Amarok.</div>
<div>By Frank Meerkoetter.</div>


<p style="color: grey;"><i>Updated Aug. 31, 2013, 7:16 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
</h1>  <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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&#39;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.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Tested with \
http://www.justing.com.cn/justpod/justpod_ch.xml</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>src/browsers/playlistbrowser/PlaylistBrowserModel.cpp <span \
style="color: grey">(281694a)</span></li>

 <li>src/core-impl/podcasts/sql/SqlPodcastMeta.h <span style="color: \
grey">(02a18d3)</span></li>

 <li>src/core-impl/podcasts/sql/SqlPodcastMeta.cpp <span style="color: \
grey">(20bcaff)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/112417/diff/" \
style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic