[MERGE] Updated InterDifferingSerializer

John Arbash Meinel john at arbash-meinel.com
Fri Dec 5 22:36:59 GMT 2008

Hash: SHA1

This patch brings in some of the changes from the CHK code. Namely, the
InterDifferingSerializer code. It is layered on top of the
"add_inventory_by_delta" patch.

While working on this, I discovered that we didn't actually have any tests
that exercised this code. Currently the only inter-differing-serializer that
we use is going from -subtree formats to -rich-root formats. (The 1.9 =>
1.9-rich-root code uses the InterModel1And2 code.)

This patch adds a few things versus the CHK code

1) Refactor the code into several functions rather than one large function.
Mostly because the level of indenting was getting rather large.

2) Use a check on text keys that need to be copied.

In my direct testing, the new code is still correct, and means we don't end up
 copying duplicate test data. For "bzr-svn" (my test case) that amounted to
16MB => 14MB. For mysql, I think this will amount to my 86% less data copied.

The nice thing about this code path is that it is, indeed, faster. Again for
bzr-svn I found the time being 40s to copy from -subtree => -rich-root down
from 60s. At that is even with Andrew's batching change to the old code.

Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the bazaar mailing list