Bug 265241 - SCAN : improve digiKam startup time with remote collections
Summary: SCAN : improve digiKam startup time with remote collections
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 2.0.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 00:59 UTC by rene
Modified: 2021-08-18 17:34 UTC (History)
4 users (show)

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


Attachments
screenshot of the settings page (71.72 KB, image/png)
2011-02-04 17:35 UTC, rene
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rene 2011-02-03 00:59:53 UTC
Version:           2.0.0 (using KDE 4.5.4) 
OS:                Linux

Starting digikam takes a long time with large collections (ca 100.000 pictures on nfs mounted drive) with saying on the console:

digikam(11944)/digikam (core) Digikam::AlbumManager::startScan: KDirWatch method =  "INotify"

could this be done in background, so it will not take 5 minutes to startup

Reproducible: Always
Comment 1 Marcel Wiesweg 2011-02-03 21:51:20 UTC
what happens if you switch off "Scan at Startup" in the setup?
Comment 2 rene 2011-02-04 17:35:31 UTC
Created attachment 56860 [details]
screenshot of the settings page
Comment 3 rene 2011-02-04 17:37:46 UTC
do you mean the "Scan for new items at startup" Setting? That is turned off
Comment 4 Marcel Wiesweg 2011-02-04 19:30:51 UTC
Then what is it doing at startup? I could have accepted that stat'ing files over a slow network was slow (even not this slow) but with scanning switched off?
Comment 5 rene 2011-02-05 19:17:01 UTC
well, the logging on the console says:

digikam(14764)/digikam (core) Digikam::IccSettings::IccSettingsPriv::scanDirectories: ("/usr/share/color/icc") digikam(14764)/digikam (core) Digikam::AlbumManager::startScan: KDirWatch method =  "INotify"
No location could be retrieved for url KUrl("file://") 
digikam(14764)/digikam (core) Digikam::ThumbnailCreator::load: Thumbnail is null for  "" 

and the long time is spent between the "INotify" statement and the No Location could be retrieved ...

How could I find out what it is doing inbetween there?
Comment 6 Marcel Wiesweg 2011-02-05 22:11:57 UTC
You could run digikam under gdb in the console, and every minute, interupt with Ctrl+C and get a backtrace with "bt" (if necessary an all-threads backtrace, "thr appl all bt") then continue with cont
Comment 7 rene 2011-02-06 02:56:10 UTC
OK, here we go:

first one:
Program received signal SIGINT, Interrupt.
0x0012e416 in __kernel_vsyscall ()
(gdb) thr appl all bt

Thread 12 (Thread 0xa5dffb70 (LWP 9085)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xafd86b54 in ?? () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 11 (Thread 0xaa761b70 (LWP 9084)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x0380c562 in ?? () from /usr/lib/libpulse.so.0
#3  0x037f8ab9 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#4  0x037faa73 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#5  0x037fab44 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#6  0x0380c303 in ?? () from /usr/lib/libpulse.so.0
#7  0x049dcbd5 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#8  0x03261cc9 in start_thread (arg=0xaa761b70) at pthread_create.c:304
#9  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xaaf67b70 (LWP 9083)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
#4  0x04593848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0x03156565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x03126609 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x03126a8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x03022b7e in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xafde881a in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#10 0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#11 0x03261cc9 in start_thread (arg=0xaaf67b70) at pthread_create.c:304
#12 0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xab768b70 (LWP 9082)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03748371 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xafda0f1c in xine_usec_sleep () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 8 (Thread 0xb336db70 (LWP 9081)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03266884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xafd74b3f in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

---Type <return> to continue, or q <return> to quit---
Thread 7 (Thread 0xb3dc5b70 (LWP 9080)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x0142d57b in Digikam::ParkingThread::run (this=0x87dbdb0) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/libs/threads/threadmanager.cpp:119
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb3dc5b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb45c6b70 (LWP 9076)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x082a30a2 in Digikam::ScanController::run (this=0x87c7ba8) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/scancontroller.cpp:599
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb45c6b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb7474b70 (LWP 9075)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#4  0x04593ba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x057a69c4 in ?? () from /usr/lib/libgio-2.0.so.0
#6  0x045ba48f in ?? () from /lib/libglib-2.0.so.0
#7  0x03261cc9 in start_thread (arg=0xb7474b70) at pthread_create.c:304
#8  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7882890 (LWP 9068)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x0373d9b3 in ___xstat64 (vers=3, name=0x92c2b50 "/media/Backup/Privat/Bilder/Eigene Bilder/2010/2010-10-12/DSC_8976.JPG", buf=0x92bc8ac) at ../sysdeps/unix/sysv/linux/xstat64.c:50
#2  0x030fbbe5 in ?? () from /usr/lib/libQtCore.so.4
#3  0x030fecf1 in QFSFileEngine::fileFlags(QFlags<QAbstractFileEngine::FileFlag>) const () from /usr/lib/libQtCore.so.4
#4  0x030b38a9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x030b3a8c in QFileInfo::isHidden() const () from /usr/lib/libQtCore.so.4
#6  0x030aba2b in ?? () from /usr/lib/libQtCore.so.4
#7  0x030ac1cd in ?? () from /usr/lib/libQtCore.so.4
#8  0x030accc9 in ?? () from /usr/lib/libQtCore.so.4
#9  0x030ace8a in QDirIterator::QDirIterator(QString const&, QStringList const&, QFlags<QDir::Filter>, QFlags<QDirIterator::IteratorFlag>) () from /usr/lib/libQtCore.so.4
#10 0x030a727f in QDir::entryInfoList(QStringList const&, QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#11 0x030a74af in QDir::entryInfoList(QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#12 0x02e254ca in ?? () from /usr/lib/libkdecore.so.5
#13 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#14 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#15 0x02e25e12 in KDirWatch::addDir(QString const&, QFlags<KDirWatch::WatchMode>) () from /usr/lib/libkdecore.so.5
---Type <return> to continue, or q <return> to quit---
#16 0x081ea0ba in Digikam::AlbumManager::addAlbumRoot (this=0x8634c48, location=...) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1207
#17 0x081e9b30 in Digikam::AlbumManager::startScan (this=0x8634c48) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1134
#18 0x0822eab2 in Digikam::DigikamApp::DigikamApp (this=0x8834018, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/digikamapp.cpp:259
#19 0x0830e119 in main (argc=1, argv=0xbffff3a4) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/main.cpp:188

==========================================================================
second one:


^C
Program received signal SIGINT, Interrupt.
0x0012e416 in __kernel_vsyscall ()
(gdb) thr appl all bt

Thread 12 (Thread 0xa5dffb70 (LWP 9085)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xafd86b54 in ?? () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 11 (Thread 0xaa761b70 (LWP 9084)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x0380c562 in ?? () from /usr/lib/libpulse.so.0
#3  0x037f8ab9 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#4  0x037faa73 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#5  0x037fab44 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#6  0x0380c303 in ?? () from /usr/lib/libpulse.so.0
#7  0x049dcbd5 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#8  0x03261cc9 in start_thread (arg=0xaa761b70) at pthread_create.c:304
#9  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xaaf67b70 (LWP 9083)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
#4  0x04593848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0x03156565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x03126609 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x03126a8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x03022b7e in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xafde881a in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#10 0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#11 0x03261cc9 in start_thread (arg=0xaaf67b70) at pthread_create.c:304
#12 0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xab768b70 (LWP 9082)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03748371 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xafda0f1c in xine_usec_sleep () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 8 (Thread 0xb336db70 (LWP 9081)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03266884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xafd74b3f in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

---Type <return> to continue, or q <return> to quit---
Thread 7 (Thread 0xb3dc5b70 (LWP 9080)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x0142d57b in Digikam::ParkingThread::run (this=0x87dbdb0) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/libs/threads/threadmanager.cpp:119
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb3dc5b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb45c6b70 (LWP 9076)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x082a30a2 in Digikam::ScanController::run (this=0x87c7ba8) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/scancontroller.cpp:599
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb45c6b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb7474b70 (LWP 9075)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#4  0x04593ba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x057a69c4 in ?? () from /usr/lib/libgio-2.0.so.0
#6  0x045ba48f in ?? () from /lib/libglib-2.0.so.0
#7  0x03261cc9 in start_thread (arg=0xb7474b70) at pthread_create.c:304
#8  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7882890 (LWP 9068)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03714202 in __getdents64 (fd=848, buf=0x944cc68 "\025\302\373\006", nbytes=32768) at ../sysdeps/unix/sysv/linux/getdents.c:156
#2  0x03714565 in __readdir64_r (dirp=0x944cc50, entry=0x936aed0, result=0x93414c4) at ../sysdeps/unix/readdir_r.c:64
#3  0x030ff8c8 in ?? () from /usr/lib/libQtCore.so.4
#4  0x030ffb5b in ?? () from /usr/lib/libQtCore.so.4
#5  0x030ac0e5 in ?? () from /usr/lib/libQtCore.so.4
#6  0x030accc9 in ?? () from /usr/lib/libQtCore.so.4
#7  0x030ace8a in QDirIterator::QDirIterator(QString const&, QStringList const&, QFlags<QDir::Filter>, QFlags<QDirIterator::IteratorFlag>) () from /usr/lib/libQtCore.so.4
#8  0x030a727f in QDir::entryInfoList(QStringList const&, QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#9  0x030a74af in QDir::entryInfoList(QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#10 0x02e254ca in ?? () from /usr/lib/libkdecore.so.5
#11 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#12 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#13 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#14 0x02e25e12 in KDirWatch::addDir(QString const&, QFlags<KDirWatch::WatchMode>) () from /usr/lib/libkdecore.so.5
#15 0x081ea0ba in Digikam::AlbumManager::addAlbumRoot (this=0x8634c48, location=...) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1207
---Type <return> to continue, or q <return> to quit---
#16 0x081e9b30 in Digikam::AlbumManager::startScan (this=0x8634c48) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1134
#17 0x0822eab2 in Digikam::DigikamApp::DigikamApp (this=0x8834018, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/digikamapp.cpp:259
#18 0x0830e119 in main (argc=1, argv=0xbffff3a4) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/main.cpp:188
(gdb) 

==========================================================================
a third one:


^C
Program received signal SIGINT, Interrupt.
0x0012e416 in __kernel_vsyscall ()
(gdb) thr appl all bt

Thread 12 (Thread 0xa5dffb70 (LWP 9085)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xafd86b54 in ?? () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 11 (Thread 0xaa761b70 (LWP 9084)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x0380c562 in ?? () from /usr/lib/libpulse.so.0
#3  0x037f8ab9 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#4  0x037faa73 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#5  0x037fab44 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#6  0x0380c303 in ?? () from /usr/lib/libpulse.so.0
#7  0x049dcbd5 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#8  0x03261cc9 in start_thread (arg=0xaa761b70) at pthread_create.c:304
#9  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xaaf67b70 (LWP 9083)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit--- 
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
#4  0x04593848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0x03156565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x03126609 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x03126a8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x03022b7e in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xafde881a in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#10 0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#11 0x03261cc9 in start_thread (arg=0xaaf67b70) at pthread_create.c:304
#12 0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xab768b70 (LWP 9082)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03748371 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xafda0f1c in xine_usec_sleep () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 8 (Thread 0xb336db70 (LWP 9081)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03266884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xafd74b3f in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

---Type <return> to continue, or q <return> to quit---
Thread 7 (Thread 0xb3dc5b70 (LWP 9080)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x0142d57b in Digikam::ParkingThread::run (this=0x87dbdb0) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/libs/threads/threadmanager.cpp:119
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb3dc5b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb45c6b70 (LWP 9076)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x082a30a2 in Digikam::ScanController::run (this=0x87c7ba8) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/scancontroller.cpp:599
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb45c6b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb7474b70 (LWP 9075)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#4  0x04593ba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x057a69c4 in ?? () from /usr/lib/libgio-2.0.so.0
#6  0x045ba48f in ?? () from /lib/libglib-2.0.so.0
#7  0x03261cc9 in start_thread (arg=0xb7474b70) at pthread_create.c:304
#8  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7882890 (LWP 9068)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03714202 in __getdents64 (fd=240, buf=0x94bd780 "\361N\352\006", nbytes=32768) at ../sysdeps/unix/sysv/linux/getdents.c:156
#2  0x03714565 in __readdir64_r (dirp=0x94bd768, entry=0x94bae38, result=0x8f8e1f4) at ../sysdeps/unix/readdir_r.c:64
#3  0x030ff8c8 in ?? () from /usr/lib/libQtCore.so.4
#4  0x030ffb5b in ?? () from /usr/lib/libQtCore.so.4
#5  0x030ac0e5 in ?? () from /usr/lib/libQtCore.so.4
#6  0x030accc9 in ?? () from /usr/lib/libQtCore.so.4
#7  0x030ace8a in QDirIterator::QDirIterator(QString const&, QStringList const&, QFlags<QDir::Filter>, QFlags<QDirIterator::IteratorFlag>) () from /usr/lib/libQtCore.so.4
#8  0x030a727f in QDir::entryInfoList(QStringList const&, QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#9  0x030a74af in QDir::entryInfoList(QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#10 0x02e254ca in ?? () from /usr/lib/libkdecore.so.5
#11 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#12 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#13 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#14 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#15 0x02e25e12 in KDirWatch::addDir(QString const&, QFlags<KDirWatch::WatchMode>) () from /usr/lib/libkdecore.so.5
---Type <return> to continue, or q <return> to quit---
#16 0x081ea0ba in Digikam::AlbumManager::addAlbumRoot (this=0x8634c48, location=...) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1207
#17 0x081e9b30 in Digikam::AlbumManager::startScan (this=0x8634c48) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1134
#18 0x0822eab2 in Digikam::DigikamApp::DigikamApp (this=0x8834018, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/digikamapp.cpp:259
#19 0x0830e119 in main (argc=1, argv=0xbffff3a4) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/main.cpp:188

==========================================================================
and a last one

^C
Program received signal SIGINT, Interrupt.
0x0012e416 in __kernel_vsyscall ()
(gdb) thr appl all bt

Thread 12 (Thread 0xa5dffb70 (LWP 9085)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xafd86b54 in ?? () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 11 (Thread 0xaa761b70 (LWP 9084)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x0380c562 in ?? () from /usr/lib/libpulse.so.0
#3  0x037f8ab9 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#4  0x037faa73 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#5  0x037fab44 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#6  0x0380c303 in ?? () from /usr/lib/libpulse.so.0
#7  0x049dcbd5 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#8  0x03261cc9 in start_thread (arg=0xaa761b70) at pthread_create.c:304
#9  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xaaf67b70 (LWP 9083)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
#4  0x04593848 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0x03156565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x03126609 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x03126a8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x03022b7e in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xafde881a in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#10 0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#11 0x03261cc9 in start_thread (arg=0xaaf67b70) at pthread_create.c:304
#12 0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xab768b70 (LWP 9082)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03748371 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xafda0f1c in xine_usec_sleep () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 8 (Thread 0xb336db70 (LWP 9081)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03266884 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xafd74b3f in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

---Type <return> to continue, or q <return> to quit---
Thread 7 (Thread 0xb3dc5b70 (LWP 9080)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x0142d57b in Digikam::ParkingThread::run (this=0x87dbdb0) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/libs/threads/threadmanager.cpp:119
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb3dc5b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb45c6b70 (LWP 9076)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x032664dc in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x030269c7 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x082a30a2 in Digikam::ScanController::run (this=0x87c7ba8) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/scancontroller.cpp:599
#4  0x03025df9 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03261cc9 in start_thread (arg=0xb45c6b70) at pthread_create.c:304
#6  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb7474b70 (LWP 9075)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x03740df6 in __poll (fds=0x37d7ff4, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x045a0a1b in g_poll () from /lib/libglib-2.0.so.0
#3  0x0459343c in ?? () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#4  0x04593ba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x057a69c4 in ?? () from /usr/lib/libgio-2.0.so.0
#6  0x045ba48f in ?? () from /lib/libglib-2.0.so.0
#7  0x03261cc9 in start_thread (arg=0xb7474b70) at pthread_create.c:304
#8  0x0374f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb7882890 (LWP 9068)):
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x0373e066 in statfs () at ../sysdeps/unix/syscall-template.S:82
#2  0x03719b31 in posix_pathconf (file=0x0, name=3) at ../sysdeps/posix/pathconf.c:73
#3  __pathconf (file=0x0, name=3) at ../sysdeps/unix/sysv/linux/pathconf.c:55
#4  0x030ffaf1 in ?? () from /usr/lib/libQtCore.so.4
#5  0x030ac0e5 in ?? () from /usr/lib/libQtCore.so.4
#6  0x030accc9 in ?? () from /usr/lib/libQtCore.so.4
#7  0x030ace8a in QDirIterator::QDirIterator(QString const&, QStringList const&, QFlags<QDir::Filter>, QFlags<QDirIterator::IteratorFlag>) () from /usr/lib/libQtCore.so.4
#8  0x030a727f in QDir::entryInfoList(QStringList const&, QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#9  0x030a74af in QDir::entryInfoList(QFlags<QDir::Filter>, QFlags<QDir::SortFlag>) const () from /usr/lib/libQtCore.so.4
#10 0x02e254ca in ?? () from /usr/lib/libkdecore.so.5
#11 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#12 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#13 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#14 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
#15 0x02e25548 in ?? () from /usr/lib/libkdecore.so.5
---Type <return> to continue, or q <return> to quit---
#16 0x02e25e12 in KDirWatch::addDir(QString const&, QFlags<KDirWatch::WatchMode>) () from /usr/lib/libkdecore.so.5
#17 0x081ea0ba in Digikam::AlbumManager::addAlbumRoot (this=0x8634c48, location=...) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1207
#18 0x081e9b30 in Digikam::AlbumManager::startScan (this=0x8634c48) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/albummanager.cpp:1134
#19 0x0822eab2 in Digikam::DigikamApp::DigikamApp (this=0x8834018, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/digikamapp.cpp:259
#20 0x0830e119 in main (argc=1, argv=0xbffff3a4) at /home/xxx/Documents/exchange/Development/digikam-2.0/digikam/digikam/core/digikam/main.cpp:188
(gdb) 



if you need more information, let me know
Comment 8 Marcel Wiesweg 2011-02-06 16:36:17 UTC
All four are sitting inside KDirWatch:

#16 0x02e25e12 in KDirWatch::addDir(QString const&,
QFlags<KDirWatch::WatchMode>) () from /usr/lib/libkdecore.so.5

so it seems adding a KDirWatch on a NFS directory either hits a bug, or a worst-case scenario in kdelibs.
Comment 9 Marcel Wiesweg 2011-02-10 22:10:43 UTC
One more question: If you execute "find <path to your collection>", or let digikam do its collection scan at startup, does it also take 5 minutes?
Comment 10 rene 2011-04-07 23:34:08 UTC
find <path_to_my_collection> takes about 4 minutes ...
Comment 11 Marcel Wiesweg 2011-04-09 15:38:38 UTC
Then NFS is the problem - on a local disk, running find on a directory with 35000 images, with dropped Linux caches, takes about 3 seconds. 
I once though about doing the full scan in the background, but even that will not help if only listing the directory takes enormous time.
Comment 12 rene 2011-05-21 19:03:51 UTC
listing the directory itself is not so timeconsuming, but scanning the complete folder structure is taking so long, the collection is organized <path_to_my_collection>/yyyy/yyyy-mm-dd/<photos> - so doing the fullscan in background would dramatically reduce startup time
Comment 13 caulier.gilles 2011-12-15 09:44:11 UTC
Rene,

This file still valid using digiKam 2.4 ?

Gilles Caulier
Comment 14 shaddowy2 2011-12-16 13:48:32 UTC
I think I had the same problem. The find command for my picture folder takes less then one minute, while starting Digikam takes five minutes when the search for new pictures is enabled. My collection includes only 12k pictures, I don't think its that big.
When I disable the lookup for new pictures at the start Digikam 2.4.1 starts very fast now. Great! So I think it's related to Ecryptfs, as my Ext4 partition is encrypted with Ecryptfs.
For me that bug is fixed.
Comment 15 Axel Krebs 2012-08-14 11:47:25 UTC
Hello,

I can confirm much better starting times. 
My version ist DigiKam 2.6.

There are weird crashes, however. Some of the re-starting tims as follows:
Ceash	    re-opening	     time	                loading message
06:53:44	06:50:23	        00:03:21	         00:00:02
08:07:51	08:10:17	        00:02:26	         00:00:02
07:33:40	07:35:26	        00:01:46	         00:00:02
08:13:04	08:14:03	        00:00:59	         00:00:02
09:34:13	09:35:50        	00:01:37	         00:00:02
09:55:20	09:58:36	        00:03:16	         00:00:02
			
So, in average, the re-opening-time after crash ist quite shorter than before. 

The misleading DigiKam-message is:

"digikam              	"		
"Process is done	  "		
"Duration 00:00:02"			

So it looks like a programmed (=fixed!!) number "00:00:02" , rather then a confirmed measured one, which could be a indicator for something.... 

Therefore I suggest to deal this number seriousloy and correct- or leave it out


Axel
Comment 16 caulier.gilles 2014-08-07 07:12:57 UTC
This entry still valid using last digiKam 4.2.0 ?

Gilles Caulier
Comment 17 caulier.gilles 2016-07-23 09:00:43 UTC
Rene,

With next digiKam 5.1.0 planed in 2 weeks, we have patched source code to be more reactive at startup. We would to know if problem remain on your configuration with this release.

Thanks in advance.

Gilles Caulier
Comment 18 Maik Qualmann 2021-08-09 19:32:01 UTC
Git commit 03f233383d94c20099afe07e75edb727694e5c3c by Maik Qualmann.
Committed on 09/08/2021 at 19:29.
Pushed by mqualmann into branch 'master'.

first step for a faster scan of network drives
We only run through a network collection once in
the first scan to determine the number of files.
The possible number of images and albums is now
taken from the database.
This can be a little less precise under certain
circumstances, we will test it.
Related: bug 405235, bug 437771, bug 431037

M  +1    -1    core/libs/database/collection/collectionscanner.h
M  +11   -13   core/libs/database/collection/collectionscanner_scan.cpp
M  +25   -4    core/libs/database/collection/collectionscanner_utils.cpp
M  +33   -0    core/libs/database/coredb/coredb.cpp
M  +5    -0    core/libs/database/coredb/coredb.h

https://invent.kde.org/graphics/digikam/commit/03f233383d94c20099afe07e75edb727694e5c3c
Comment 19 Maik Qualmann 2021-08-16 20:12:10 UTC
Git commit d14487fc0da4e26bc7ba2a82730b7a36d1c4cff6 by Maik Qualmann.
Committed on 16/08/2021 at 20:09.
Pushed by mqualmann into branch 'master'.

use album modification date to speed up the initial scan
Database update from V13 to V14 is carried out, the
column "modificationDate" is added to the Albums table.
Related: bug 405235, bug 437771, bug 431037

M  +14   -4    core/data/database/dbconfig.xml.cmake.in
M  +1    -1    core/libs/database/collection/collectionscanner.h
M  +5    -0    core/libs/database/collection/collectionscanner_p.cpp
M  +53   -16   core/libs/database/collection/collectionscanner_scan.cpp
M  +45   -0    core/libs/database/coredb/coredb.cpp
M  +19   -1    core/libs/database/coredb/coredb.h
M  +9    -1    core/libs/database/coredb/coredbschemaupdater.cpp

https://invent.kde.org/graphics/digikam/commit/d14487fc0da4e26bc7ba2a82730b7a36d1c4cff6
Comment 20 Maik Qualmann 2021-08-18 17:34:30 UTC
Git commit 9a443ffcae0f417d355a16e5040225f3a8e7075a by Maik Qualmann.
Committed on 18/08/2021 at 17:33.
Pushed by mqualmann into branch 'master'.

use album date cache to reduce file reading
Related: bug 405235, bug 437771, bug 431037

M  +2    -0    core/libs/database/collection/collectionscanner_p.h
M  +37   -3    core/libs/database/collection/collectionscanner_scan.cpp
M  +1    -1    core/libs/database/utils/scan/scancontroller_progress.cpp
M  +10   -2    core/libs/database/utils/scan/scancontroller_start.cpp

https://invent.kde.org/graphics/digikam/commit/9a443ffcae0f417d355a16e5040225f3a8e7075a