Some thoughts about splitting the inventory according to subdirectories

Matthieu Moy Matthieu.Moy at imag.fr
Sun Feb 26 13:52:46 GMT 2006


Hi,

It has been mentionned here that bzr might move to an inventory format
using one file per directory.

The obvious benefit is to avoid having to parse the complete inventory
file when working on subdirectories. It also makes it possible to
implement a --no-recursion efficiently for some commands.

I realized that there is another important one (and I'm posting to
make sure other people have realized it too): if each parent inventory
points to its subdirectory inventories with a checksum (or if you have
somewhere a meta-inventory pointing to all inventory files), then it
becomes possible to compare two inventories in O(number of files in
modified directories) instead of O(total number of files). Since the
unmodified subdirectories will have the same checksum, there's no need
to compare them. I suppose this can have a noticeable impact on small
merges over large trees.

My 2cents,

-- 
Matthieu




More information about the bazaar mailing list