[Digikam-devel] [Bug 172269] Digikam hangs for around 20-60 seconds when starting
Marcel Wiesweg
marcel.wiesweg at gmx.de
Fri Oct 10 15:02:05 BST 2008
http://bugs.kde.org/show_bug.cgi?id=172269
--- Comment #15 from Marcel Wiesweg <marcel wiesweg gmx de> 2008-10-10 16:02:01 ---
In 0.9 the algorithm was:
Stat file names in dir, get file names from db, compare, scan new files.
In 0.10 it is:
Stat directory info (name + modification date),
get name+modification date from db, compare, scan new or changed files.
For an album with 500 images, my timing log is as follows:
Digikam::CollectionScanner::scanAlbum: Scanning album "/media/fotos/Mailand
2008"
Digikam::CollectionScanner::scanAlbum: Checks and creating album 1
Digikam::CollectionScanner::scanAlbum: List entries from database 36
Digikam::CollectionScanner::scanAlbum: Arranged in hashes 1
Digikam::CollectionScanner::scanAlbum: Stat'ing directory 1398
Digikam::CollectionScanner::scanAlbum: Checked individual files 7
As you see, the only significant time spent is for stat'ing, which is for us
one line of code:
const QFileInfoList list = dir.entryInfoList(d->nameFilters, QDir::AllDirs
| QDir::Files | QDir::NoDotAndDotDot /*not CaseSensitive*/);
Command line "dir" can stat this directory in 200ms (<70ms with hot caches), so
Qt is doing stuff here that takes too much time.
Before I get to optimizing here however, I would like to know if you have
actually the same problem.
--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Digikam-devel
mailing list