Bug 328124 - digiKam extremely unresponsive and slow (probably related to tags)
Summary: digiKam extremely unresponsive and slow (probably related to tags)
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Engine (show other bugs)
Version: 4.2.0
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-26 21:16 UTC by Kristian
Modified: 2014-08-17 09:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments
valgrind output (923.83 KB, text/x-log)
2013-11-27 21:57 UTC, Kristian
Details
digiKam console output with debug statements (38.09 KB, text/x-log)
2013-11-28 20:12 UTC, Kristian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian 2013-11-26 21:16:10 UTC
Some weeks ago digiKam became extremely unresponsive and slow. It's practically unusable. In addition, the software needs a couple of minutes to start and eats quite a lot of cpu. One temporary workaround is to delete digikamrc and start with a brand new config. However, after tagging some images or managing tags, digiKam becomes unresponsive again. For example opening the tag sidebar takes some seconds and if it's open it takes several seconds to select an image.

Here's strace output with old digikamrc:
$ strace -c digikam
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
"/org/freedesktop/UDisks2/drives/ST9500420AS_5VJ7TFAV" : property "DeviceNumber" does not exist 
"/org/freedesktop/UDisks2/drives/ST9500420AS_5VJ7TFAV" : property "Device" does not exist 
digikam(11719)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
digikam(11719)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 66.07    0.670216           0   9714295   9696459 access
 31.91    0.323717          18     18259           poll
  0.69    0.007040           1      8710       153 read
  0.45    0.004528           8       591       211 futex
  0.24    0.002406          96        25           sched_yield
  0.19    0.001921           0      4479      2088 readlink
  0.13    0.001291           0     28154      5551 stat
  0.11    0.001145           0     35643     27574 recvfrom
  0.04    0.000422           0      4174       766 open
  0.04    0.000386           0      8313           writev
  0.03    0.000332           0     24170           write
  0.02    0.000241           0      1809           munmap
  0.02    0.000182           0      2677           mmap
  0.01    0.000141           0      5328           fstat
  0.01    0.000129           0      3336       211 lstat
  0.01    0.000102           0      1496         4 fcntl
  0.01    0.000069           0      3679           close
  0.01    0.000055           0       232        10 openat
  0.00    0.000044           0       261           sendmsg
  0.00    0.000035           0       814           mremap
  0.00    0.000019           0       325       122 recvmsg
  0.00    0.000019           0        54        19 statfs
  0.00    0.000000           0      1786           lseek
  0.00    0.000000           0       674           mprotect
  0.00    0.000000           0       465           brk
  0.00    0.000000           0        12           rt_sigaction
  0.00    0.000000           0         2           rt_sigprocmask
  0.00    0.000000           0        93           ioctl
  0.00    0.000000           0         3           pipe
  0.00    0.000000           0        74           select
  0.00    0.000000           0         2           msync
  0.00    0.000000           0         9           madvise
  0.00    0.000000           0         3           shmget
  0.00    0.000000           0         3           shmat
  0.00    0.000000           0         6           shmctl
  0.00    0.000000           0         4           getpid
  0.00    0.000000           0        27           socket
  0.00    0.000000           0        14         2 connect
  0.00    0.000000           0        10           accept
  0.00    0.000000           0        22         1 sendto
  0.00    0.000000           0         5           shutdown
  0.00    0.000000           0        13           bind
  0.00    0.000000           0        11           listen
  0.00    0.000000           0        23           getsockname
  0.00    0.000000           0        15           getpeername
  0.00    0.000000           0        20           setsockopt
  0.00    0.000000           0        14           getsockopt
  0.00    0.000000           0        22           clone
  0.00    0.000000           0         1           execve
  0.00    0.000000           0        35         1 kill
  0.00    0.000000           0        51           uname
  0.00    0.000000           0         3           shmdt
  0.00    0.000000           0         7           fsync
  0.00    0.000000           0         4           ftruncate
  0.00    0.000000           0       444           getdents
  0.00    0.000000           0       104           getcwd
  0.00    0.000000           0        19           rename
  0.00    0.000000           0        59        11 unlink
  0.00    0.000000           0        57        19 chmod
  0.00    0.000000           0        19           fchown
  0.00    0.000000           0         2           umask
  0.00    0.000000           0         1           getrlimit
  0.00    0.000000           0         1           getrusage
  0.00    0.000000           0        49           getuid
  0.00    0.000000           0         9           getgid
  0.00    0.000000           0         8           geteuid
  0.00    0.000000           0         3           getegid
  0.00    0.000000           0         1           getresuid
  0.00    0.000000           0         1           getresgid
  0.00    0.000000           0       460           fstatfs
  0.00    0.000000           0         1           arch_prctl
  0.00    0.000000           0         1           sched_getaffinity
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         8           fadvise64
  0.00    0.000000           0         4           clock_gettime
  0.00    0.000000           0         4           clock_getres
  0.00    0.000000           0         4           inotify_init
  0.00    0.000000           0       741           inotify_add_watch
  0.00    0.000000           0         8           ppoll
  0.00    0.000000           0         1           set_robust_list
  0.00    0.000000           0         1           timerfd_create
  0.00    0.000000           0         1           eventfd2
  0.00    0.000000           0         2           pipe2
  0.00    0.000000           0         1           inotify_init1
------ ----------- ----------- --------- --------- ----------------
100.00    1.014440               9872272   9733202 total

And here with fresh digikamrc:
$ strace -c digikam
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
"/org/freedesktop/UDisks2/drives/MATSHITADVD_RAM_UJ892_HG97_445404" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/ST9500420AS_5VJ7TFAV" : property "Drive" does not exist 
digikam(12458) KSambaSharePrivate::findSmbConf: KSambaShare: Could not find smb.conf! 
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
"/org/freedesktop/UDisks2/drives/ST9500420AS_5VJ7TFAV" : property "DeviceNumber" does not exist 
"/org/freedesktop/UDisks2/drives/ST9500420AS_5VJ7TFAV" : property "Device" does not exist 
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
QPainter::setFont: Painter not active
QPainter::fontMetrics: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setFont: Painter not active
QPainter::fontMetrics: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setFont: Painter not active
QPainter::fontMetrics: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 66.04    0.269995           9     29844           poll
 26.69    0.109124           0   2225399   2207738 access
  3.86    0.015763           2     10132       472 read
  1.16    0.004761           5      1019       210 futex
  0.96    0.003922           0     13128           writev
  0.63    0.002583           0     56007     42930 recvfrom
  0.24    0.000998           0     29673      5055 stat
  0.09    0.000360           0      4485      2088 readlink
  0.08    0.000314           0      4307       814 open
  0.05    0.000214           0     27072           write
  0.03    0.000138           0      4564       212 lstat
  0.03    0.000130           0      1925           munmap
  0.03    0.000105           0      2806           mmap
  0.02    0.000070           0       679           mprotect
  0.02    0.000065           0      5287           fstat
  0.02    0.000063           0      3757           close
  0.02    0.000062           0       295           sendmsg
  0.01    0.000033           0       814           mremap
  0.01    0.000031           0      1777           lseek
  0.01    0.000026           0       232        10 openat
  0.01    0.000025           2        14           getsockopt
  0.00    0.000018           5         4           ftruncate
  0.00    0.000018           0       460           fstatfs
  0.00    0.000000           0       795           brk
  0.00    0.000000           0        12           rt_sigaction
  0.00    0.000000           0         2           rt_sigprocmask
  0.00    0.000000           0       146           ioctl
  0.00    0.000000           0         3           pipe
  0.00    0.000000           0        89           select
  0.00    0.000000           0        44           sched_yield
  0.00    0.000000           0         2           msync
  0.00    0.000000           0        39           madvise
  0.00    0.000000           0         7           shmget
  0.00    0.000000           0         7           shmat
  0.00    0.000000           0        14           shmctl
  0.00    0.000000           0         4           getpid
  0.00    0.000000           0        29           socket
  0.00    0.000000           0        16         4 connect
  0.00    0.000000           0        10           accept
  0.00    0.000000           0        22         1 sendto
  0.00    0.000000           0       332       125 recvmsg
  0.00    0.000000           0         5           shutdown
  0.00    0.000000           0        13           bind
  0.00    0.000000           0        11           listen
  0.00    0.000000           0        23           getsockname
  0.00    0.000000           0        15           getpeername
  0.00    0.000000           0        20           setsockopt
  0.00    0.000000           0        16           clone
  0.00    0.000000           0         1           execve
  0.00    0.000000           0        34           kill
  0.00    0.000000           0        71           uname
  0.00    0.000000           0         7           shmdt
  0.00    0.000000           0      1739         4 fcntl
  0.00    0.000000           0         7           fsync
  0.00    0.000000           0       444           getdents
  0.00    0.000000           0       107           getcwd
  0.00    0.000000           0        36           rename
  0.00    0.000000           0        76        11 unlink
  0.00    0.000000           0       108        37 chmod
  0.00    0.000000           0         1           fchmod
  0.00    0.000000           0        35           fchown
  0.00    0.000000           0         2           umask
  0.00    0.000000           0         1           getrlimit
  0.00    0.000000           0         1           getrusage
  0.00    0.000000           0        67           getuid
  0.00    0.000000           0         9           getgid
  0.00    0.000000           0         8           geteuid
  0.00    0.000000           0         3           getegid
  0.00    0.000000           0         1           getresuid
  0.00    0.000000           0         1           getresgid
  0.00    0.000000           0       145        37 statfs
  0.00    0.000000           0         1           arch_prctl
  0.00    0.000000           0         1           sched_getaffinity
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         8           fadvise64
  0.00    0.000000           0         4           clock_gettime
  0.00    0.000000           0         4           clock_getres
  0.00    0.000000           0         3           inotify_init
  0.00    0.000000           0       750           inotify_add_watch
  0.00    0.000000           0         9           inotify_rm_watch
  0.00    0.000000           0         8           ppoll
  0.00    0.000000           0         1           set_robust_list
  0.00    0.000000           0         1           timerfd_create
  0.00    0.000000           0         1           eventfd2
  0.00    0.000000           0         2           pipe2
  0.00    0.000000           0         1           inotify_init1
------ ----------- ----------- --------- --------- ----------------
100.00    0.408818               2429055   2259748 total


Reproducible: Always

Steps to Reproduce:
1. Start digiKam
2. Navigate around
Actual Results:  
digiKam ist extremely unresponsive

Expected Results:  
digiKam should be responsive
Comment 1 caulier.gilles 2013-11-26 21:58:40 UTC
All that i can see is that something is broken on your computer, about network file system share through Samba. Perhaps it's due to a system update...

It's not digiKam, just a side effect.

Check your system.

Gilles Caulier
Comment 2 Kristian 2013-11-27 21:57:12 UTC
Created attachment 83800 [details]
valgrind output

valgrind --tool=memcheck --leak-check=full --error-limit=no --log-file="digikam-valgrind.log" digikam
Comment 3 Kristian 2013-11-27 21:58:24 UTC
What makes you so sure that it's not a digiKam issue? The Samba error message? That's easy resolved by installing samba (although it's not needed). But this doesn't change anything regarding to digiKam's responsiveness.
Do you have any idea where to start searching? I attached the valgrind output to start.
Comment 4 caulier.gilles 2013-11-27 22:08:54 UTC
There is nothing to see in valgrind trace about your problem.

A detailled trace of digiKam started will be more instructive.

Look in this page about how to enable debug spaces before to run digiKam...

http://www.digikam.org/contrib

Gilles Caulier
Comment 5 Kristian 2013-11-28 20:12:42 UTC
Created attachment 83811 [details]
digiKam console output with debug statements

Note: The missing libkvkontakte is not the reason.
Comment 6 Kristian 2013-12-07 10:48:01 UTC
Switching the icon theme from Oxygen to another one (.nitrux for example) somehow solves the problem. I don't know if this a digiKam or KDE problem. However, digiKam is the program that is predominantly affected.
Comment 7 caulier.gilles 2013-12-07 13:59:35 UTC
digiKam is not directly relevant of icon theme set in your KDE desktop.

The way to render application style (widget/icons/window decoration) is relevant of theme. Oxygen style is the most complex with a lots of settings, as OpenGL effect for ex.

I recommend to check advanced settings for this theme in KDE control panel and check the results. Some effects depend of video card and quality of video driver, which include time latency   ...
Gilles Caulier
Comment 8 Kristian 2013-12-10 21:14:27 UTC
It's related to the ICON THEME, there are no further setting related to OpenGL etc.
Comment 9 Kristian 2014-08-17 09:35:03 UTC
This issue returned in the last couple of days. Unfortunately, I can't tell you what triggered it. Changing the icon theme did not fix it. However, after reading the bugs #315574 and #307219, I saw that several of my tags had an symbol with a question mark. Resetting all tags with this icon to the standard icon improved performance significantly and now digiKam is usable again.

Note: Contrary to bug #315574 the performance issue did not only appear when a sidebar was open, but all the time. I suspect that one of the tags with question mark icon was in the list of last used tags (right-click menu). Therefore, those bugs might be duplicates.

Component info:
digiKam version 4.2.0
Exiv2 kann in JP2 speichern: Ja
Exiv2 kann in JPEG speichern: Ja
Exiv2 kann in PGF speichern: Ja
Exiv2 kann in PNG speichern: Ja
Exiv2 kann in TIFF speichern: Ja
Exiv2 unterstützt XMP-Metadaten: Ja
LibCImg: 130
LibEigen: 3.2.1
LibExiv2: 0.24
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.13.3
LibKExiv2: 2.3.1
LibKGeoMap: 2.0.0
LibKdcraw: 2.4.2
LibLCMS: 2060
LibLensFun: 0.2.8-0
LibPGF: 6.14.12 - Interne Bibliothek
LibPNG: 1.6.12
LibQt: 4.8.6
LibRaw: 0.16.0
LibTIFF: LIBTIFF, Version 4.0.3 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble-Funktion: 0.18.3 (stable release)
Parallelisierte PGF-Codecs: Keine
Parallelisiertes Entfernen von Mosaikmustern: Unbekannt
Prozessorkerne: 4
Unterstützung für Demosaic GPL2: Unbekannt
Unterstützung für Demosaic GPL3: Unbekannt
Unterstützung von RawSpeed-Codec: Unbekannt
Datenbanktreiber: QSQLITE
KIPI-Module: 4.2.0
LibGphoto2: 2.5.4
LibKface: 3.4.0
LibKipi: 2.1.0
LibOpenCV: 2.4.9