Experiences with KDE-CVS at LinuxWorldExpo

Havoc Pennington hp at redhat.com
Mon Nov 11 15:01:54 GMT 2002


On Mon, Nov 11, 2002 at 01:12:33PM +0100, Waldo Bastian wrote: 
> To solve the documentation problem I think schemas would indeed be a 
> good solution but I would rather not have to read them during normal 
> operation.

That's exactly how it works (does not read them normally). What
happens is that apps ship schemas (defaults, docs) in special XML
files, and then when you install the app the schema is "installed"
into the gconf database which is where the app would be reading
anyhow.

>  Config options are typically used in two places: in the 
> application itself and in a config dialog. Currently in KDE defaults 
> are hard-coded in the code (typically in multiple locations, which is 
> a maintenance problem) I think it would be acceptable if schema's 
> where used for the config dialog but in the application itself this 
> causes rather unnecessary overhead IMO. 

The way that gconf works there isn't extra overhead here, an app sees
a schema default just as if the setting were already set in the
configuration file.

Typically gnome defaults are also hard-coded into the code, but these
hardcoded defaults only get used as emergency fallback when a user's
installation is badly hosed; normally we use the schema default only.

This has a big advantage, which is that you can change the defaults 
without having to patch any code.
 
> The other thing that concerns me is the communication overhead with a 
> (local) daemon, does a GConf application make roundtrips to this 
> daemon for every config-key it needs to lookup?

No, there are several optimizations here (batch lookups, a client-side
cache, and keeping the protocol carefully async/oneway).

Havoc




More information about the kde-core-devel mailing list