[MERGE] fix bug 64789, compact versions refs as they are added to Knits

John Arbash Meinel john at arbash-meinel.com
Tue Oct 31 21:58:05 GMT 2006


We currently have a small bug in how versions are added to knits. When
doing a large join, if you add a lot of versions who have linear
history, the references are added as though the parent was not added.
Which means that instead of getting a reference like "100" you get
".parent-id at foo-234234234-23aoa3a34a34".

In the past, Robert confirmed it was a bug. The biggest difference is
that it makes knit index files larger than they need to be. By
approximately 50 characters per line, so with 100 entries, that is 5K
extra that needs to be downloaded for every knit.

It is also 5K more data that needs to be uploaded on the initial push,
since the remote target doesn't have any revisions to dictionary compress.

To give a specific example, branching bzr.dev to a clean directory doing:
 find . -name '*.kndx' | xargs wc

Without this patch:
  41163  250784 5727712 total

with this patch:
  41163  250784 3384112 total

Which shows there are the same number of entries, but the total size is
5.4MB versus 3.2MB.

That's a lot of upload bandwidth when pushing up a new branch to
launchpad (since it doesn't support repositories yet).

Now, it is only 2MB out of ~40MB including all of the data hunks. But it
still is noticeable.

Even more important is that we download the whole knit index when we are
determining what revisions a remote knit has. So tweaking the index can
give big performance savings.

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_versions_compresses.patch
Type: text/x-patch
Size: 7251 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061031/f58e622f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061031/f58e622f/attachment.pgp 


More information about the bazaar mailing list