<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 2010-08-13 21:28, Ralf Engels wrote:
<blockquote cite="mid:1281727712.1669.4.camel@pc02" type="cite">
<pre wrap="">Hi all,
the following change seems to fix the Amarok crashes for me.
Surprisingly.
</pre>
</blockquote>
<br>
+1 for this patch, looks good.<br>
<br>
Notes:<br>
<ul>
<li>A similar 'containsTrack()' check before the 'subscribeTo()'
calls in 'insertTracksCommand()' might also be useful?<br>
<br>
</li>
<li>This patch is going to make "remove tracks" agonizingly slow in
large playlists. O(N*M).<br>
</li>
</ul>
<br>
--<br>
However, that performance problem is not this patch's fault, it should
be fixed by making 'containsTrack()' smarter. <br>
<br>
Can be done by maintaining a mapping like:<br>
<blockquote>//! maps track pointers to playlist items<br>
QMultiHash<Meta::TrackPtr, Item*> m_TrackToItems;<br>
</blockquote>
<br>
I happen to have old patches for that, that weren't committed yet when
I semi-retired. Attached.<br>
<br>
They probably won't apply perfectly anymore, but useful for anyone
who's interested.<br>
<br>
Regards,<br>
Nanno<br>
<br>
</body>
</html>