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

List:       kde-devel
Subject:    KRegistry implementation...
From:       iglio () fub ! it (Pietro Iglio)
Date:       1999-07-22 12:58:35
[Download RAW message or body]

I would like to discuss the current implemention of KRegistry.

KRegistry acts like a "in memory" database of mimetypes and .desktop files.
It can be used to access information about a mimetype/desktop file (icon,
comment, etc.) without parsing the corresponding configuration file.

Currently, the whole registry is saved in a binary format under
~/.kde/share/config/kregistry and its completely loaded in memory.

The limit of this approach is memory consumption, expecially if you have
a large number of applications installed.

What I suggest here is to implement KRegistry as a cache. If, for example,
I request the Icon for the pdf mimetype, KRegistry looks up in its internal
cache and, if the information hasn't been loaded yet, KRegistry drops the
least recently accessed entry and parses the corresponding .desktop file.

The size of the in-memory cache could be user-configurable, so that the
size of the config/kregistry file will be constant.

I would like to know if this is possible to implement kregistry this way or
there are some kind of queries that cannot be executed unless the registry
has completely been loaded in memory.

Also, what about using a database format (such as gdbm) insted of the
raw format for config/kregistry?

-- Pietro

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

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