bring speed back into KConfig
Dirk Mueller <[email protected]> Tue, 15 Apr 2008 16:59:41 +0200
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Message-ID | <[email protected]> |
Hi, the "knotify4 eats cpu" bugreport seems to be highly popular, so the reason for that seems to be the incredible performance loss in KConfigIni due to the "kconfig refactoring branch" being merged last autumn by Andreas Pakulat. The code now uses highlevel QByteArray operations and even worse QFile operations for operating on the .ini files. My testcase of kwin.notifyrc, this means: 2000 lines of config resulting in 16000 ~QByteArray() and 16000 QByteArray() constructions 6000 syscalls (stat() and 2x llseek()) due to QFile::readLine and QFile::atEof() 8000 memcpy operations in time: 150ms KConfig4 45ms via QSettings of Qt 4.4 29ms via KConfig3 I think thats a bit under performing. Anyone interested in fixing the hot spots in that code? I think it is fairly obvious why the code is extremely slow. I wanted to take a look at it myself but I guess I'll run out of time before I get anywhere. Thanks, Dirk