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

List:       kde-devel
Subject:    Re: KConfig again
From:       Mosfet <mosfet () jorsm ! com>
Date:       1999-05-17 10:06:02
[Download RAW message or body]

On Sun, 16 May 1999, Christoph Neerfeld wrote:
> On 17-May-99 Mosfet wrote:
> > 
> > And also how KConfig is used. As I mentioned before, almost all apps read in
> > the KConfig items they want in their constructors and put them in local data
> > structures. They do not call readEntry a bunch of times throughout the
> > program. 
> 
> I don't know what other developers do, but I tend to keep the information in
> config objects and don't copy it to local variables. But of course I would do it
> if I knew that KConfig rereads the file every time.

This does not seem to be a good idea in any case. If you need to access a key
many times it seems better to load it into a variable than calling KConfig over
and over.

> 
> -Chris
>  
> > Then they may or may not write out they keys on exit. Many apps don't even do
> > this because kcm modules handle their config keys.... 
> > 
> > Why cache something that is not used for the vast majority of time for most
> > applications?
>  
> > --
> > Daniel M. Duley - Unix developer & sys admin.
> > mosfet@kde.org
> > mosfet@jorsm.com
> > 
> 
> --------------------------------------------------------------
> Christoph Neerfeld <Christoph.Neerfeld@home.ivm.de>
>                    <chris@kde.org>
--
Daniel M. Duley - Unix developer & sys admin.
mosfet@kde.org
mosfet@jorsm.com

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

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