[PATCH 0 of 4 RFC] Reusing the zlib stream when compressing revlog chunks
wagner.bruna+mercurial at gmail.com
Mon Feb 8 17:20:47 CST 2010
This is an experimental patch series to avoid resetting the
zlib stream when compressing revlog chunks. Instead of
compressing each delta chunk separately, the zlib stream used
for decompressing each snapshot chunk is preserved, and
reused for the decompression of its delta chunks.
By the way: "experimental" here means that I *haven't* taken
the necessary steps to properly update and check the requires
file, and the changes on revlog chunks take effect
immediately on any new revisions: a patched hg *will* mess up
your existing repositories, so please be careful when
But since I've been sitting on it since at least a year, I
decided to update it for crew tip and post it
more-or-less-as-is for reviewing. If there's enough interest,
I'll prepare proper patches for inclusion.
To try it, simply apply to a current hg, and clone --pull a
repository. A sample result follows:
$ du -sh hg-crew-*/.hg
This is actually my "best case"; most repositories on my
tests reduced by only 4-10%. I'm not sure if that'd be a
general rule, so if you try it, please send your results.
All coments are welcome.
More information about the Mercurial-devel