Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlog.py @ 5368:61462e7d62ed
changegroup: avoid large copies
- handle chunk headers separately rather than prepending them to
(potentially large) chunks
- break large chunks into 1M pieces for compression
- don't prepend file metadata onto (potentially large) file data
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 03 Oct 2007 17:17:28 -0500 |
parents | 7530334bf301 |
children | 64cf1c853674 |
line wrap: on
line diff
--- a/mercurial/revlog.py Wed Oct 03 17:17:27 2007 -0500 +++ b/mercurial/revlog.py Wed Oct 03 17:17:28 2007 -0500 @@ -1094,7 +1094,9 @@ meta += mdiff.trivialdiffheader(len(d)) else: d = self.revdiff(a, b) - yield changegroup.genchunk("%s%s" % (meta, d)) + yield changegroup.chunkheader(len(meta) + len(d)) + yield meta + yield d yield changegroup.closechunk()