[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KConfig memory usage / .kderc
From:       Steffen Hansen <stefh () mip ! sdu ! dk>
Date:       1999-05-16 0:09:01
[Download RAW message or body]

On Sat, 15 May 1999 pbrown@redhat.com wrote:

> Hi developers:
> 
> I finished porting KConfig from QDicts to QMaps, which should
> theoretically eliminate memory "holes" that were side effects of using the
> QDict (hash table).  I haven't run any head-2-head tests though, I'm
> curious to do this w/someone else before I commit the changes.  Any ideas
> on how to do a decent test to determine memory savings? 
> 
> In worse news, I now realize that we are wasting between 30 and 50k of
> memory each time we create a new KConfig object.  This is because of all
> the key,value pairs that are contained in ~/.kderc.  It has ballooned up
> quite a bit recently, too.  Each time a KConfig is created these global
> entries are included in addition to any config-file specific entries.  It
> is data so it is not shared.  Thus if you have 10 KDE programs running on
> your system (and we usually have at least that many) you are wasting at
> least 300-500k.  That's pretty senseless.
> 
> Any ideas about how to get these values into some sort of shared memory
> area?

.kderc holds stuff like fonts, guistyle and colors. This data is a real
good candidate to be placed on in a property of the root window of the
display instead of being read from a file. We have KRootProp in kdecore
for that.

Now we only need to find an app that starts very early in startkde and
lives through the whole session so that is can write the entries back to a
file at the end. Or maybe writes should always go to a file, and the X
property should only be a cache for all the apps who only reads the
data. Who writes .kderc currently? I guess only very few apps.

greetings,
--------------
Steffen Hansen                              |
email: stefh@mip.sdu.dk, stefh@imada.sdu.dk,|  
       hansen@kde.org                       | ABC...VWXKZ :)
URL:   http://www.mip.sdu.dk/~stefh         | 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic