Bazaar-NG vs. Mercurial -- speed comparison

Robert Collins robertc at robertcollins.net
Sat May 20 23:15:12 BST 2006


On Thu, 2006-05-18 at 19:12 +0000, Bryan O\'Sullivan wrote:


> The only similarity is that both are append-only.  Revlog files do not
> represent a weave, while knits do.  I suspect that you have to read an entire
> knit file to reconstruct the most recent revision, while a revlog file has
> a small upper bound on the amount of data you have to read to reconstruct
> any revision.

As already noted the similarities are closer than you thought :). I'm
just clarifing what knits do for clarity.

A knit provides what we call the 'VersionedFile' interface. A
VersionedFile represents a store of a single file. It stores a graph of
versions, and a text for each version. Texts are optionally annotated,
and you can use the annotation for history-sensitive merges.

We have two implementations of VersionedFile - 'WeaveVersionedFile'
which is a literal weave in memory, and 'KnitVersionedFile', which [like
revlog] loads an index into memory, and after that reconstructs any text
on demand by downloading a snapshot and at most some constant number of
deltas.

The knit delta compressed the texts against each other, in annotated
form. The presence of annotation data allows us to annotate any single
version of the file without accessing all the ancestors of that version.
The deltas are created along the left-most parent of the version, and
are capped at a maximum chain length of 50. 

In the index we support an arbitrary number of parents for each version,
and we dictionary compress those within the index. If a parent is known
but not available, we store the full identifier of the parent. The index
is safe against partial writes, only a complete write of a index entry
will be considered an entry when a reader reads the index.

Thats about it ;).


We've been discussing what ideal storage would look like - trying to
articulate all the constraints we're trying to address at the same time.
(knits are ok, but not ideal IMO).

http://www.robertcollins.net/talks/2006slug-vcsstorage.odp has the
slides for a recent talk I did summarising this.

Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060521/e8ef035f/attachment.pgp 


More information about the bazaar mailing list