[Digikam-devel] [Bug 150938] Album thumbnail view very slow on NFS

Bengt Ahlgren bengt.ahlgren at sics.se
Sun Oct 21 00:13:33 BST 2007


------- 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=150938         




------- Additional Comments From bengt.ahlgren sics se  2007-10-21 01:13 -------
I have investigated this further today. The culprit is that the image caption, tag names and rating are not kept in the ImageInfo class. When these values are needed, as they are for redisplaying the thumbnail view, e.g., due to scrolling, the DB is *always* queried, resulting in three DB queries per image. Sometimes this is even done twice per image.

I made a quick hack changing the ImageInfo class to cache the values for rating, caption and tag names. The result is that digikam becomes useable over NFS! There is still some time lag to start the display of a selected album, but there is no delay whatsoever in scrolling. Viewing with showimage is also an order of magnitude faster in switching to the next image.

There was one culprit due to that e.g., ImageInfo::rating() is declared const. I am a c++ newbie, but as I understand, it means that rating() can't update the instance variables. I wanted getItemRating to be called on demand, but that was not possible without removing "const". Since that had consequences in other places, the hack calls getItemRating when the ImageInfo instance is created.

I am willing to work further on this, but would like to get some feedback first!

Bengt



More information about the Digikam-devel mailing list