Bug 175898 - selecting in the import dialog is extremly slow
Summary: selecting in the import dialog is extremly slow
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-IconView (show other bugs)
Version: 0.10.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-23 16:11 UTC by simon
Modified: 2017-08-17 07:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.10.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description simon 2008-11-23 16:11:32 UTC
Version:           0.10.0-beta6 (using 4.1.80 (KDE 4.1.80 (KDE 4.2 Beta1)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.26-tuxonice

when selecting images in the Import dialoge (using usb camera) it seems that during the selection process too much metadata is retrieved from the files or other slow operations lead to ~2seconds delay per picture and make the mouse hang when the selection rectange should be smooth

this happens especially when selecting from the right side first (starting with the newer images )
Comment 1 caulier.gilles 2008-12-05 14:43:25 UTC
SVN commit 892924 by cgilles:

call right slot with File/new action
BUG: 175898


 M  +3 -3      cameraiconview.h  
 M  +2 -3      cameraui.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=892924
Comment 2 caulier.gilles 2008-12-05 14:49:10 UTC
Oups sorry, wrong commit (:=))). re-open

Gilles Caulier
Comment 3 Mikolaj Machowski 2008-12-08 17:05:47 UTC
Works instantly for me in 0.10b7svn
Comment 4 simon 2008-12-08 17:16:36 UTC
seems to be related to bug #175894,

i get those same error messages during selecting
Comment 5 simon 2008-12-08 17:18:08 UTC
sorry,

forgot to paste the specific lines:
---
error reading file:///media/disk-1/dcim/106_pana//p1060828.jpg
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#cameraModel"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#focalLength"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#mimeType"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#cameraManufacturer"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#orientation"
loading writer for key  "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#flashUsed"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#35mmEquivalent"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#contentCreated"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#whiteBalance"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#height"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#url"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#width"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#size"
loading writer for key  "http://strigi.sf.net/ontologies/0.9#depth"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#meteringMode"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#sourceModified"
loading writer for key  "http://strigi.sf.net/ontologies/0.9#parentUrl"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#exposureBias"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#exposureTime"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#name"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#fileExtension"
error reading file:///media/disk-1/dcim/106_pana//p1060828.jpg
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#cameraModel"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#focalLength"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#mimeType"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#cameraManufacturer"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#orientation"
loading writer for key  "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#flashUsed"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#35mmEquivalent"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#contentCreated"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#whiteBalance"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#height"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#url"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#width"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#size"
loading writer for key  "http://strigi.sf.net/ontologies/0.9#depth"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#meteringMode"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#sourceModified"
loading writer for key  "http://strigi.sf.net/ontologies/0.9#parentUrl"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#exposureBias"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#exposureTime"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#name"
loading writer for key  "http://freedesktop.org/standards/xesam/1.0/core#fileExtension"
... and so on
Comment 6 Mikolaj Machowski 2008-12-08 17:32:22 UTC
@Simon: looks like Nepomuk problem - it tries to to instantly index new files. IMO if possible digiKam should disable Nepomuks interference - there is no need to index files if they are on camera or removable medias if not asked.
Comment 7 caulier.gilles 2008-12-08 18:45:15 UTC
Simon,

Sound like a broken KDE installation or something like that. this message come from DBUS, not digiKam

Gilles Caulier
Comment 8 caulier.gilles 2008-12-16 16:32:59 UTC
Mik,

We don't use yet Nepomuk in digiKam... Sound like a part of KDE4 used in digiKam play with Nepomuk directly... Perhaps Solid... Marcel ?

Gilles Caulier
Comment 9 caulier.gilles 2008-12-16 16:33:41 UTC
*** Bug 175894 has been marked as a duplicate of this bug. ***
Comment 10 Marcel Wiesweg 2008-12-16 18:22:19 UTC
Maybe the messages are generated because we use KMetaFileInfo? (cameraitempropertiestab)
XESAM is definitely related with nepomuk/strigi and not directly used by digikam.
Comment 11 Mikolaj Machowski 2008-12-16 19:00:47 UTC
I recently noticed those messages on my computer: but it doesn't slow down operations.
Comment 12 simon 2008-12-16 21:13:28 UTC
i think that the slowdown comes from
"error reading file:///media/disk-1/dcim/106_pana//p1060828.jpg"

Mikolaj: you have this errormessage too ? if not, thisshould be the culprit, i would also say that my kde install (trunk) and quite sane and dbus is working fine so far.

--- start guesswork ---

i think there must be two different access methods for 
* downloading files to the harddrive and (works)
* getting data when thumbnails on usb are doubleclicked (as this fails with the same error message - error reading file)
and when selecting the second approach is used

--- end guesswork ---
Comment 13 Marcel Wiesweg 2008-12-16 21:45:59 UTC
No both for normal downloading and opening the image the same method is used.
You can easily test from the command line if the relevant file is accessible or not.
I dont know where the error string "error reading" comes from, it is not used anywhere in digikam.
Comment 14 caulier.gilles 2008-12-16 21:49:40 UTC
"error reading" ... libkexiv2 or Exiv2 ?

Gilles
Comment 15 simon 2008-12-16 22:12:24 UTC
it disappeared!

i just tried it again after a finished kde-svn recompile and now i don't even get those messages ("loading writer for key ...") and selection just works smooth! yeah! 

also the "error reading" went away - 
i don't have the whole kde tree laying around here, but a grep should find the "error reading" message, might be libkexiv2 (which was also updated during the rebuild)

but, it is now replaced by:

QFSFileEngine::open: No file name specified
digikam(1966)/digikam (core) Digikam::UMSCamera::downloadItem: Failed to open dest file for writing:  ""

when doubleclicking on a thumbnail, but i'll open a new bug for this and a other issue i found
Comment 16 simon 2008-12-16 22:30:23 UTC
bummer.

its back!
i had the "Properties" tab collapsed, but when this tab is open, the old behaviour is there again/still
Comment 17 Marcel Wiesweg 2008-12-16 22:45:17 UTC
I can confirm the 
Digikam::UMSCamera::downloadItem: Failed to open dest file for writing:  ""
error message, number one.

Number two, if you have your speed problem only with the properties tab open, then it is indeed something in there. It can be either downloading exif info from the camera, opening DMetadata or KMetaFileInfo on the file.
Comment 18 Mikolaj Machowski 2008-12-16 23:50:28 UTC
Now I cannot force KDE to spit out xesam messages :/
Comment 19 caulier.gilles 2008-12-17 15:22:06 UTC
With this commit:

SVN commit 898140 by cgilles: backport commit #897995 from KDE3 branch 
M +1 -2 cameracontroller.cpp 
M +1 -2 gpcamera.cpp 
M +60 -84 umscamera.cpp 
M +4 -4 umscamera.h 
WebSVN link: http://websvn.kde.org/?view=rev&revision=898140 

KFileMetaInfo is removed from USB Mass Storage driver. Now it's faster.

Marcel: KFileMetaInfo do _not_ provide any informations about image or video. It's a huge regression because we cannot get minimal informations from images if not Exif info is available.

Andreas: I CC you here because it become urgent to have a method in Exiv2 to get metadata outside Exif/iptc/XMP from file format. For ex, to be able to get image size from image header (JPEG, PNG, and JPEG2000 have these informations). Before, with KDE3, KFileMetaInfo class been used to extract it.

Simon, 

Please update digiKam code using svn and try again. Thanks in advance

Gilles Caulier


Comment 20 caulier.gilles 2008-12-17 15:56:30 UTC
SVN commit 898152 by cgilles:

digiKam from trunk: CameraGUi: fix empty tmp folder used to download item when user trying to open image from camera
BUG: 175898


 M  +23 -23    cameracontroller.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=898152
Comment 21 simon 2008-12-18 13:25:01 UTC
works like a charm, thanks!
Comment 22 Andreas Huggel 2008-12-19 09:02:04 UTC
Re comment #19:

Gilles, 

Some info is already available from the Exiv2::Image interface, in particular pixelHeight() and pixelWidth(): http://www.exiv2.org/doc/classExiv2_1_1Image.html#4d616c94b3d8129a3abcbec2c200feda

A more general implementation is on the roadmap for 0.19, please add additional requirements there: http://dev.robotbattle.com/bugs/view.php?id=505

Andreas
Comment 23 caulier.gilles 2008-12-19 09:25:47 UTC
Andreas,

Thanks for the tip. I will fill Exiv2 report #505

Gilles