Bug 200654

Summary: image dimensions in albums slows down scrolling dramatically
Product: [Applications] digikam Reporter: rom1v
Component: Albums-MainViewAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: 0.10.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 1.0.0

Description rom1v 2009-07-18 15:36:51 UTC
Version:            (using KDE 4.2.4)
OS:                Linux
Installed from:    Ubuntu Packages

When enabling in album view the dimension of images, it seems to recompute the result (read again the .jpg file, which is slow) every time the renderer is called : when you scroll, it "freezes" very often (for maybe 200ms), which makes the scrolling not smooth at all.

As soon you disable the showing of image dimensions, it is very smooth. If you enable filename or some other information, that's ok, the only problem is with image dimensions.

To resolve the problem, I suppose two thing should be done :
- compute the image dimension (read the file) asynchronously (like for the thumbnails)
- cache the dimensions, to avoid recomputing them (like for the thumbnails)
Comment 1 caulier.gilles 2009-07-18 16:00:52 UTC
Which digiKam version you use exactly ?

Gilles Caulier
Comment 2 Andi Clemens 2009-07-18 16:07:42 UTC
I can see no real difference with dimensions turned on and off.
Maybe callgrind will show something, but right now for me it is working fine.
Comment 3 rom1v 2009-07-18 16:13:59 UTC
I use digikam 0.10.0.

Try in an album with for example 200 photos, and scroll very fast. I tested on 2 computers, and there is really a difference.
Comment 4 rom1v 2009-07-18 16:48:43 UTC
The two computer on which I tested had no real graphic card (a lowcost intel gma…).

I tested on my laptop, with nvidia (and nvidia proprietary drivers), and effectively, with or without dimensions, it works fine.

I don't know if this is a graphic card problem, my laptop is far faster than the two others for every component (cpu, ram, harddrive, graphic card), so I don't know what does limit the performances on the others when dimensions details are enabled.
Comment 5 rom1v 2009-07-18 17:10:12 UTC
In fact, it seems to be a graphical performances problem : if I enable any information under the photo (filename, dimensions), it slows down dramatically on computer with slow graphical card (layout too complicated?) (but dimensions slows down more than filename).
Comment 6 Andi Clemens 2009-07-18 20:33:08 UTC
One little note: If you compiled digiKam by yourself, try using "debug" buildtarget instead of "debugfull". This will optimize the compiled code and run much faster than the "debugfull" version.

This is a general rule for self-compiled code: Before measuring speed issues, compile with optimizations, in digiKam's case by using the target "debug", "relwithdebinfo" or "release".

The icon view isn't that complicated, so displaying some text shouldn't be a problem :D I measured the code with callgrind and I can see no difference with dimensions displayed.

It might be a graphics card driver issue in your case, I experienced such problems some months ago, when the nVidia driver wasn't performing well.
Comment 7 Marcel Wiesweg 2009-07-20 15:11:06 UTC
Really seems to be graphics stack related. Maybe "--graphicssystem raster" helps, upgrading graphics driver or Qt version. Nothing from the digikam side to do here.