Re: Adding .db support to pkg_tools

I think this is a really bad idea. The problem with the tools is not
with the files. It is that the files need to be parsed on each run,
often recursively, and your solution would not help at all.

Parsing one file isn't expensive; parsing several hundred files
to find one bit of information is expensive.

The database(s) should just be a cache of the information stored in the

Bingo! As long as the .db version can be easily recreated
from scratch from the master data stored in the same files
as always, it doesn't really matter if the BDB is occasionally
corrupted, as long as it can be rebuilt fairly quickly.

So, the key points are:
* Use the .db file for lookups that can't be done quickly
against the existing data. In particular, look for operations
where the pkg tools have to scan a lot of files to verify a single
* Ensure the .db file can be deleted and rebuilt from scratch
from the data in the regular files.

Tim Kientzle
freebsd-hackers@xxxxxxxxxxx mailing list
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"