Bug 277257 - CORE : bad performance when moving images inside digiKam collections
Summary: CORE : bad performance when moving images inside digiKam collections
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 1.9.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 04:36 UTC by Simon
Modified: 2017-07-25 16:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments
Moving files: Debug output log (169.35 KB, text/plain)
2011-07-07 07:50 UTC, Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon 2011-07-07 04:36:09 UTC
Version:           1.9.0 (using KDE 4.6.4) 
OS:                Linux

I select 120 images and move them to a different folder on the _same_ partition.
* 0.5 s when done in dolphin
* 60 s when done in digikam
Half a second for one image? This is quite some time. I also wait 5 s when moving 10 images. Why is this?

I'm on a Core2Duo 3.16 GHz, Samsung F4 EG (2 TB).

Reproducible: Always

Steps to Reproduce:
Move files.


Expected Results:  
...

OS: Linux (x86_64) release 2.6.39-2.slh.1-aptosid-amd64
Compiler: gcc
Comment 1 caulier.gilles 2011-07-07 05:11:03 UTC
There is no reason for that. In both case, KDE KIOSlave are used in background...

Also, it's not reproducible on my computer (digiKam 2.0.0 RC)

Gilles Caulier
Comment 2 Simon 2011-07-07 05:41:31 UTC
I'll test again when 2.0 is out. Cannot explain it either; it is the same when renaming or deleting pictures as well. 
Is it maybe related to thumbnail generation which digikam tries to run at the same time? I just noticed that the first few images are renamed very quickly, then it again takes 0.5 s per image (and the album view constantly changes).
Comment 3 caulier.gilles 2011-07-07 06:46:34 UTC
If it's the case, it's abnormal. Thumbs are generated in a separated thread, it don't must slowdown GUI. Here it's not the case (single our double core computer)

Run kdebugdialog and turn on digiKam debug space including kioslave and kexiv2 and kdcraw. run digiKam in a console and look trace.

Also, which image format you use ? JPEG or RAW ?

Gilles Caulier
Comment 4 Simon 2011-07-07 07:50:03 UTC
Created attachment 61665 [details]
Moving files: Debug output log

Moved around 50 files. Hope the log is useful.
Comment 5 Simon 2011-07-07 07:50:35 UTC
And, the images were JPG usually.
Comment 6 caulier.gilles 2011-07-08 11:59:27 UTC
At each file moved, KDE API fired an event through KDirWatch to brind digiKam database about new file to parse and registered. It can take a while. This can explain the difference with Dolphin.

On my computer (double core), the difference is not too big. At least, it take more time, sure, but it's not like in your computer.

But i'm use digiKam 2.0.0 RC. We probably improve this behavior (more than one year of development). If you can, please try this version on your computer.

Thanks in advance

Gilles Caulier
Comment 7 S. Burmeister 2011-07-08 12:27:26 UTC
I also often have the feeling that digikam writes to the database after each step it takes. E.g. if one has a folder of new images. Instead of first reading all thumbnails and displaying them. It feels like digikam writes the thumbnail to the database/hdd after each picture – which of course slows the displaying of the thumbnails down.
Comment 8 Marcel Wiesweg 2011-07-11 16:37:34 UTC
Simon: Is significant CPU usage involved for any process?

Sven: Yes, it writes each newly generated thumbnail to db immediately. (one time ever per picture). Of course, SQlite is very slow with a write operation. Here MySQL will be superior.
Comment 9 caulier.gilles 2011-12-15 08:49:38 UTC
Simon,

Do you see comment #8 from Marcel ?

Gilles Caulier
Comment 10 caulier.gilles 2014-08-07 07:22:41 UTC
Do you use mysql or sqlite database ?

Gilles Caulier
Comment 11 caulier.gilles 2014-08-07 07:45:48 UTC
We need a fresh feedback using last digiKam 4.2.0

Gilles Caulier
Comment 12 Simon 2014-08-09 09:53:26 UTC
Can only test on 3.5 right now. Would this help as well?
Comment 13 caulier.gilles 2014-08-10 09:27:46 UTC
It's better than nothing.

But last stable 4.2.0 is out and it will be better to switch to 4.x series, where a lots of bugs have been fixed.

Gilles Caulier
Comment 14 caulier.gilles 2014-09-02 07:33:47 UTC
Simon,

Any feedback ?

Gilles Caulier
Comment 15 caulier.gilles 2015-11-28 18:49:33 UTC
With 5.0.0, we drop KIOSlave and replace DB access to a pure multi-threaded interface, which is more faster and efficient.

We have also drop the KDirWatch API in favor of QFileSystemWatcher.

This king of problem with 5.0.0 is not reproducible with SQlite database.

I close this file now.

Gilles Caulier