kconfig and kde global config files

Aaron J. Seigo aseigo at kde.org
Sun Mar 5 04:48:30 GMT 2006

On Saturday 04 March 2006 15:00, Lubos Lunak wrote:
>   (0 benchmarking here too) I'd expect that the stats don't matter. You'd
> have to do them once at app startup anyway, then they'd be cached by the
> kernel and if done noticeably later they'd be lost in the noise anyway.

including statting locations that didn't exist previously in the file system? 
is that also cached in the kernel? we move around between /etc, $PREFIX, 
$KDEDIRS and $KDEHOME, and often multiple locations in each ...

>   As for optimizing KConfig, I wonder if the problem rather isn't the way
>  KConfig works, QMap usage specifically. When I benchmarked the KDE startup
>  last time it spent 10% time in KConfig (according to
>  http://www.kdedevelopers.org/node/1661).

it will be interesting to compare different backends here ... 

>  Memory usage isn't that nice either

yes, there's a lot that can be made better here, especially in the case of 
multiple kconfig objects. which we often have due to the pervasive use of INI 
files to store information (.desktop files, icon themes, etc).

>  brought by changing KConfig so that the INI backed could be rewritten to
>  read-only mmap the files, implement readXYZ() by basically doing strstr()
> on the file for just parsing the one needed line and having a QMap (list,
> whatever) only for changed entries.

you could save memory doing this, but there would likely be a hit on speed. 
instead of doing changed entries only in the map one could also possibly 
cache previously read values. often times when a setting gets read once, it 
gets read multiple times in the app. hmm.. will have to experiment.

Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060304/4640caa5/attachment.sig>

More information about the kde-core-devel mailing list