Bug 203932 - Image view scrolling and thumb-generation is very slow
Summary: Image view scrolling and thumb-generation is very slow
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-MainView (show other bugs)
Version: 0.10.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-15 12:27 UTC by Benjamin Schindler
Modified: 2012-06-27 09:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schindler 2009-08-15 12:27:27 UTC
Version:           0.9.0 (using KDE 4.2.4)
Compiler:          gcc-4.3 
OS:                Linux
Installed from:    Gentoo Packages

Hi

Scrolling in digikam's albumview feels extremely slugish here. Also, thumbnail generation is very slow. 

I know this comparison is not without merits, but gwenview's scrolling in the "album-view" is lighting fast. Admitted, this is an older machine (Athlong 64 3000 and to be replaced in a few days), but the scrolling speed is definatelly sup par

Cheers
Comment 1 Julien Narboux 2009-08-15 12:29:42 UTC
0.9.0 is a very old version of Digikam, please update and try again.
Comment 2 Benjamin Schindler 2009-08-15 12:33:26 UTC
Gosh, sorry for that.... 

I ment 0.10.0
Comment 3 caulier.gilles 2009-08-15 12:34:14 UTC
Last version for KDE3 is 0.9.6...

Gilles Caulier
Comment 4 caulier.gilles 2009-08-15 12:35:10 UTC
Not reproducible here. Run digiKam into a console and report all messages displayed...

Gilles Caulier
Comment 5 caulier.gilles 2009-08-15 12:36:19 UTC
Do you use a special video driver (NVidia for ex), with OpenGL features ?

Gilles Caulier
Comment 6 Benjamin Schindler 2009-08-15 12:51:40 UTC
I'm using nvidia-drivers (latest)

I get absolutelly no output from digikam while scrolling (I enabled it in kdebugdialog)

Is there anything I can do to help?
Comment 7 Andi Clemens 2009-08-15 13:38:31 UTC
0.10 is definitely slower than the current 1.0.0-beta versions, since 0.10 still uses the slower thumbnail scaling algorithm. Try 1.0.0-beta4 or current SVN and see if it is getting better (it should).
Comment 8 Benjamin Schindler 2009-08-23 11:37:59 UTC
Okay, I'm now on latest svn (had some troubles with compilation of beta3 which is why it took so long)
I'm also on my new machine, a core i7 920 (opposed to a athlon64 3000+...) so a comparison is not easy at all. Thumbnail loading certainly got faster.
Of course, scrolling is now pretty fast, but it doesn't feel completely snappy. 
It uses now about 40% cpu which is for sure 100% on the old machine - and therefore I presume that the feel would still be quite sluggish on my old machine

I think some asynchronous scrolling (like gwenview) would make things a lot better
Comment 9 Marcel Wiesweg 2009-08-23 15:05:34 UTC
What is asynchronous scrolling?
Comment 10 Benjamin Schindler 2009-08-23 22:09:48 UTC
Basically that means, that the main thread just requests the display of all the images that need to be shown and a second worker thread loads the thumbnails and the metadata (if it's not cached).
The main thread just renders a very small svg (like the one gwenview has when the thumbnail is not loaded)

This has the effect, that scrolling is very smooth and thumbnails are loaded almost as fast (or even faster when on a multi-core machine as the two threads can be distributed)
Comment 11 Marcel Wiesweg 2009-08-24 18:51:42 UTC
We do what is described, with the exception that we dont draw an SVG but nothing if the thumbnail is not in the cache.
Maybe we can optimize redrawing a bit. This needs thorough profiling.
Comment 12 Marcel Wiesweg 2009-08-27 20:39:07 UTC
SVN commit 1016400 by mwiesweg:

Eliminate a source of doube loading of thumbnails: When the QImage is loaded and waiting to
be processed to a QPixmap and the same thumbnail is requested again, scan the list of
images currently waiting for conversion, and, if found, do not start a new task.
To prevent such problems in the future, provide a small cache for thumbnail QImages.

CCBUG: 203932

 M  +1 -1      loadingcache.cpp  
 M  +44 -9     thumbnailloadthread.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016400
Comment 13 Andi Clemens 2009-08-27 22:16:58 UTC
To the ones who experience slow scrolling:
You should also notice that compiling digiKam with "debug" or "debugfull" will slow down scrolling a lot. To really compare you should compile it with "release" and see if it is getting better.
Comment 14 Benjamin Schindler 2009-08-27 22:23:41 UTC
I just tried the new code - the feel is certainly better on the new machine. CPU usage in scrolling went to 20%, which is a big improvement. 

Typical - as soon you have a machine there is the need of having the old one :)

I can't test there because it's in pieces now, so I don't think I can ask for more
Comment 15 Mikolaj Machowski 2009-08-27 23:40:31 UTC
Scrolling seems faster, both in regular Album GUI and thumbbars.

But switching between images in Preview mode with thumbbar enabled is very, 
very slow. With thumbbar disabled it is much faster.
Comment 16 caulier.gilles 2011-12-14 09:28:28 UTC
Benjamin, 

This file still valid using digiKam 2.x serie ?

Gilles Caulier
Comment 17 Benjamin Schindler 2011-12-14 09:35:00 UTC
I have a newer machine since I opened this issue. with the new machine, no slowness is visible. However, I cannot really tell whether the issue is gone though. Since the update to kde 4.7.4, digikam crashes on startup so I cannot profile cpu usage during scrolling right now
Comment 18 caulier.gilles 2011-12-14 09:37:28 UTC
benjamin,

any crash backtrace please, taken with GDB

Gilles Caulier
Comment 19 Benjamin Schindler 2011-12-14 09:57:46 UTC
I just recompiled digikam and it works again. (I did not have debug information before)

Consider it as a non issue
Cheers
Benjamin