>>>> "Michael" == Michael Sperber
<sperber(a)informatik.uni-tuebingen.de> writes:
Michael> We've gone over kpathsea already numerous time for the
Michael> job.
Michael> For XEmacs, what's needed is something which works at the
Michael> package level in a quite different way.
Tell me if I'm way off base. I feel like I barely know what I'm
talking about.
What if the `database.[hc]' got overhauled to support `btree'
databases with multiple entries per key? It does that; `global' uses
it, and I think the Debian `man-db' does also. I've not had the time
to study it in depth, and cannot do the work at this time... but it
seems like having that support in the XEmacs database code would be
generally useful, for things like `GTAGS', "callers-of", perhaps
symbol tables or something (is it fast?), and the package system.
It would be good to have `in-memory' btrees and hashes via berkeley
db also, maybe... (You tell me and we'll both know.) Record/File
locking (in case of multiple processes accessing the .db) ought to go
in also. Wouldn't a `tied' hash/btree thing be neat, like "perl"
has? (digressing... for that matter, perl regexp's, ala libpcre2,
would be really nifty...)
You can define a btree database entry with a key and value, then
enter another value under the same key. When you do a lookup, you
get the first value under that key, then use the `seq' method to grab
each of the next values. Utilizing that feature of db, `global'
stows a key for a function, then a value for each location it's used.
That could work for the package system, with a package name, then a
location for each version, I suppose.
I think you can use the `btree' to look for values of keys with a
certain prefix also, like the `tab' key does in the minibuffer... I
think I recall reading something like that in either `global',
`man-db', or the `btree' man page.
It would have to run an `install-xemacs-package' utility that updated
that database. Using a db would avoid the `stat()' calls (possibly
slowly occuring accross NFS or SMB connections) at startup. Does the
db2 library build on all systems that XEmacs does? I've no clue. I
think it builds on Win32; iirc, there are #ifdef's that would
indicate that.
Shutting up already... Karl.