[Akonadi] [Bug 334218] synchronizations of large folders with filesystem contents hogs a Sandybridge core for minutes stat()ing every file in it

Martin Steigerwald Martin at Lichtvoll.de
Sat May 3 13:36:55 BST 2014


https://bugs.kde.org/show_bug.cgi?id=334218

--- Comment #9 from Martin Steigerwald <Martin at Lichtvoll.de> ---
Sergio, I tried:

107     QStringList listNew() const
108     {
109         static int count = 0; count++;
110         static int elapsed = 0;
111 
112         QDir d( path + QString::fromLatin1( "/new" ) );
113         d.setSorting(QDir::NoSort);
114 
115         QTime t;
116         t.start();
117         QStringList list = d.entryList( QDir::Files );
118         elapsed += t.elapsed();
119         kDebug() <<  "PERF: listNew NoSort " << count << elapsed << "\n";
120         return list;
121 
122         //return d.entryList( QDir::Files );
123     }
124 
125     QStringList listCurrent() const                                         
126     {
127         static int count = 0; count++;
128         static int elapsed = 0;
129 
130         QDir d( path + QString::fromLatin1( "/cur" ) );
131         d.setSorting(QDir::NoSort);
132 
133         QTime t;
134         t.start();
135         QStringList list = d.entryList( QDir::Files );
136         elapsed += t.elapsed();
137         kDebug() <<  "PERF: listCurrent NoSort " << count << elapsed <<
"\n";
138         return list;
139 
140         //return d.entryList( QDir::Files );
141     }

as well as your

-        std::cout <<  "PERF: listNew NoSort " << count << elapsed << "\n";
+        kDebug() <<  "PERF: listNew NoSort " << count << elapsed << "\n";

I see no output on konsole or in ~/.xsession-errors even with full debug
enabled in kdebugdialog before starting akonadi again.

Additionally I look at the callgrind files again and I still think they are
quite different.

The nodirsorting callgrind-vcard.26128.1 has:
- QDir::entryList
- QAlgorithmsPrivate::qSortHelper
- QAlgorithmsPrivate::qSortHelper
- QDirSortItemComparator::operator
- QString::compare

as first 5 out of first 6 entries. And none of it has a very long bar.

Yet the old callgrind has

- QAlgorithmsPrivat::qSortHelper, lr 145684.95, lr per call  as the first of
the entries and it has a very long outstanding bar. This very long outstanding
bar is basically gone in the new callgrind run. Here as directly from callgrind
file:

So somewhere QDir may still sort something, but not at the original place
anymore. At least thats my bet on looking at the data.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list