comments on KDE performance tips

Alexander Neundorf kde-optimize@mail.kde.org
Fri, 17 Jan 2003 17:46:29 +0100


On Thursday 16 January 2003 15:41, Maks Orlovich wrote:
> > doesn't gconf have answers for this sort of problem?
> > i thought they used a central db and a cache, and alerted
> > apps of config changes and stuff?
>
> I don't think we open enough config files for it to make much difference
> (although I may be wrong when it comes to cold starts and machines with
> little memory), I think, since the commonly used files will probably be in
> the caches since after the desktop startup anyway; particularly since
> KConfig parser and I/O code are very fast, while the data-structures are
> slow (Maintaining a red-black tree with a key containing two strings is a
> lot more expensive than one would expect). 

Do you still remember pre KDE 2.0 times ?
At this time there was a *slow* data structure used (was it a simple list ?), 
and changing it to a tree improved the performance dramatically.

But of course string comparisons aren't the fastest thing in the world. But 
I'm afraid there is no way around it.
At some point the keys have to be evaluated.

Bye
Alex