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

Arnd Baecker arnd.baecker at web.de
Thu Mar 6 20:35:34 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         
arnd.baecker web de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcel.wiesweg gmx de



------- Additional Comments From arnd.baecker web de  2008-03-06 21:35 -------
To bring back part of the discussion on the mailing list to this bug, 
a description of Gilles:
"""
- a class named PixmapManager handle thumbs image for each icon item.
- a class named AlbumIconView manage view of icon from main
interface.

in AlbumIconView, we have a method named nextItemToThumbnail() which
is called by PixmapManager::slotComplete() when a thumb have been
found in cache (or regenerate in background if necessary by a
kio-slave)

When you select a new album or if you scrool icon view, PixmapManager
will call AlbumIconView::nextItemToThumbnail() to get the next icon
instance to thumbnailize.

Now if you look how AlbumIconView::nextItemToThumbnail() method work,
you will see than the first and the last _visible_ items are used to
limit regeneration of thumbs...

If you want to change the behaviours of thumbnails genration done in
background the code from AlbumIconView::nextItemToThumbnail() need to
be fixed to handle the first and the last iconview item item from
current album, not the visible ones.

But take a care : regenerate all icon thumbs in background take a
while, especially with slow computer. Of course a kioslave is a
separate process which run outside of digiKam but we don't have any
control to set the priority (as a separate thread)

So, for huge album and slow computer (using a single processor
especially) thumb generation will slow down digiKam. This is why the
current thumbs generation behaviours have been implemented to only
generate current visible items.

This is my proposal :

- added a new option in "Album Settings" page from Setup dialog, into
"Interface Options". A checkbox is enough here. The new option must
be disable by default.
- patch AlbumSettings class to manage this new option.
- patch AlbumIconView::nextItemToThumbnail() to handle this option
(thrue an AlbumSettings method) to change behaviours accordingly
(only visible items or all items)
"""

Just a comment on the possible performance:
What happens, if one displays a huge album (e.g. all images from 2007),
where the thumbnails have not been generated?
Possible problems:
- 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?)

Now how to address the issue:
In principle 
    IconItem *fItem = firstItem();
    IconItem *lItem = lastItem();
should technically work  in AlbumIconView::nextItemToThumbnail(), 
but this doesn't.

Marcel, your help is needed here!



More information about the Digikam-devel mailing list