<br><br><div><span class="gmail_quote">2008/1/4, Arnd Baecker <<a href="mailto:arnd.baecker@web.de">arnd.baecker@web.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>with the new recursive view of albums and the quick filters in the<br>status bar some performance problems become visible<br>when the number of involved images becomes large.<br><br>Let me describe a couple of cases for an album with 16289 images
<br>(let's call that "2007" in the following);<br>for the tests below "Include Album Sub-Tree" is activated.<br>(of course, the slower your computer, the more clearly the effects<br>will be visible...).
<br><br>1.) - Start from an album with a small number of images (e.g 24).<br> The status line says "img_xx.jpg (1 of 24)"<br> - Switch to "2007".<br> The status line does not change for quite some time
<br> (approx 5s on a reasonably fast machine).<br> There is no visual indication, that something is happening.<br><br> Question: Can the whole process be made faster?<br> Possible solution: a progress bar should be added (see also below)
</blockquote><div><br>There is already a progress bar in status bar used when you assign a tag to a large collection of image, or to prepare a slideshow.<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Attempt at an analysis:<br> After the selection of "2007" dozens of calls to<br> void AlbumIconView::slotImageListerNewItems<br> followed by<br> DigikamView::slotImageSelected()<br> take place.
<br> Only at the very end<br> DigikamView::slotDispatchImageSelected()<br> gets called.<br><br> Is there anything in these steps which could be optimized?<br><br>2.) Start from "2007" and activate the rating filter (
e.g. >= 5stars).<br><br> Here a visual indication in terms of an hour glass as mouse cursor<br> is given (however that does not appear immediately).<br> In my case I get 52 pictures, but it takes about 14 seconds!
<br><br> (Sometimes the status line is not updated properly at the end?)<br><br> Attempt at an analysis:<br><br> Most of the time is spent in AlbumLister::slotFilterItems()<br> While the first loop in that routine is not extremely fast,
<br> it is the second part after the comment<br> // This takes linear time - and deleting seems to take longer.<br> // Set wait cursor for large numbers.<br><br> If I understand things correctly, this means that in the example
<br> 16289 - 52 images get deleted.<br><br> This looks like the place to be optimized<br> (by a better strategy, I would guess ...).<br><br> This also explains, why changing between 4 and 5 star filtering<br> (593 vs. 52 results) is faster.
<br><br> In this case, the bottle-neck is the first loop in<br> AlbumLister::slotFilterItems()<br> which calls<br> matchesFilter<br> for each item.<br> ((Note: We might have to be careful with adding too much complexity
<br> in the matchesFilter, or use more clever strategies))<br> Speed improvements to the first loop would be therefore be<br> very helful, also in view of the next point.<br><br>3.) Start from "2007" (with all images) and type some text in
<br> the text filter.<br><br> - if you don't type very fast (I did not manage),<br> one will not see the 2nd letter of a word for a while.<br><br> The reason is that for a new text<br> void AlbumLister::setTextFilter
<br> is called, which sets the filterTimer.<br> Then<br> void AlbumLister::slotFilterItems()<br> is called, before the next call to<br> void AlbumLister::setTextFilter<br> becomes active.
<br><br> - Then the main bottle-necks are as in 1.) and 2.).<br><br>As a short term solution I would suggest to<br>put the waitCursor at the beginning of<br>void AlbumLister::slotFilterItems(),<br>if d->itemList.count
() > 500 (etc.)<br>This should give some visual feedback.</blockquote><div><br>yes <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Should I open a new bug report with the above text<br>to collect ideas/comments and patches?</blockquote><div><br>yes, of course.<br><br>Gilles</div></div><br>