Knits vs Weaves

Aaron Bentley aaron.bentley at utoronto.ca
Fri Feb 17 03:10:42 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Denys Duchier asked about Knits vs Weaves on IRC, then departed for his
beauty sleep.  My understanding is second-hand, so hopefully someone can
flesh this out.

It's kinda subtle, but we've pretty consistently avoided calling Knits
append-only weaves, preferring terms with a little more wiggle-room like
"an append-only weave-like format".  Knits sprang from my Weavediff
concept which was an append-only Weave, but they have become something
of their own.

The big difference between knits and weaves is that knits do not require
you to read the whole file, even if you want an annotated text.  Knits
store periodic annotated snapshots, so they support fast annotation and
weave merge without reading the whole thing.

Another difference is that, as I understand it, knits can include lines
from arbitrary revisions, without marking those revisions as parents of
any kind.

Since they're append-only, it's not computationally expensive to update
knits.  It's not quite as simple as just appending text fragments to the
end of the file, but it's the next best thing; AIUI, it's just a matter
of mapping revision ids to index numbers.

Another advantage is that some operations can use the index file instead
of opening the main knit.

To be honest, I don't understand why network operations are blazing fast
with knits.  Perhaps someone else can fill us in?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD9T6y0F+nu1YWqI0RAgsWAJ9MWLa1G45nQpfHhwYyZowus5VN9ACcD9k7
wDRbzEAEnFYAxfgPlaEdj+Q=
=u4W/
-----END PGP SIGNATURE-----




More information about the bazaar mailing list