[Digikam-devel] [Bug 137320] Thumbnails should continue loading for images that are off-screen

Marcel Wiesweg marcel.wiesweg at gmx.de
Mon Mar 17 21:50:14 GMT 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=137320         




------- Additional Comments From marcel.wiesweg gmx de  2008-03-17 22:50 -------
After looking at the source I have these answers to you:

 - moving to a different place (with the slider) in the same view: 
   would those images thumbnails only be displayed after all other ones 
   have been generated? 
   (Or are thumbnails for images currently in view generated first?) 
 - if one then moves to a different view (e.g. 2006), 
   will the 2007 thumbnails be still generated in the background? 
   (I.e., is there any way to stop the thumbnail generation when 
    changing views, so that full priority goes to the currently wanted 
    thumbnails?) 

It seems that from PixmapManager, there is only one ThumbnailJob active for one thumbnail at any time. The next thumbnail to generate is determined by nextItemToThumbnail, which always is a visible item. This means there is a waiting time of at most the currently active thumbnail creation when moving to a new view, until the first now-visible item is processed.

There are mechanisms in ThumbnailJob to support multiple Urls in one job, but it seems to me these are not used.

Also note that PixmapManager stores the retrieved _pixmaps_ in a cache of size 100. This means that pixmaps should not be loaded extensively, as they are not directly transferred to the view, but the loading is:
paint -> load -> in pixmap cache? no-> load from disk -> store in pixmap cache
paint -> load -> retrieve from pixmap cache
so the process relies on having all visible pixmaps in the cache.

Then, thumbnail generation is a two step process:
1) Original image -> thumbnail on disk
2) Thumbnail on disk -> image and pixmap in memory
(these steps are optionally merged on first creation)
What takes more time is 1), the second step is relatively fast, especially if the thumbnail files are still in the OS disk cache. Step 2) is still noticeable; but, you can do the maths better than me, even keeping around 100 pixmaps in memory is in the lower two-digit megabyte range as to memory usage (on the x.org process, for pixmaps, I think)



More information about the Digikam-devel mailing list