<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="https://git.reviewboard.kde.org/r/112417/">https://git.reviewboard.kde.org/r/112417/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit 22486a5d6bd7a6c9f1b88008b81a47bef2f8d6fe by Vedant Agarwala on behalf of Frank Meerkötter to branch tagguessing.</pre>
<br />
<p>- Commit Hook</p>
<br />
<p>On September 8th, 2013, 6:29 p.m. UTC, Frank Meerkoetter wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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 Sept. 8, 2013, 6:29 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
amarok
</div>
<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'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="https://git.reviewboard.kde.org/r/112417/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>