Mercurial > hg-stable
diff tests/test-debugbundle.t @ 36971:b89a7ef29013
bundle: include advisory rev branch cache part in bundle2 bundle
`hg bundle` command producing bundle2 will now include an optional part
containing the revision-branch cache data.
The data sent are mostly nodes so it is quite compact. The goal of the
rev-branch-cache is to speed up branch map computation, especially when the
branchmap gets invalidated so we send data for all exchanged changesets. In
addition, computing the relevant heads to send in case of partial pulling would
be challenging.
As a reminder, the rev branch cache data significantly speed up branch
computation. Having it around provides a small speedup to pull/clone and much
higher tolerance to branch map cache invalidation that might happens from later
commands.
On the Mercurial repository, computing the visible branchmap from scratch move
from 2.00 seconds to 0.34s (a -83% speedup).
Using this new part, Unbundling the full Mercurial repository moves from 25.736
seconds to 24.030 seconds (around -7% speedup). The bundle size increase is
around 3% (from 22.43 MB to 23.13MB)
On an half a million revision repository with twenty thousand
branches, computing the branchmap moves from 75 seconds to 45 second (-40%) if
the caches is used.
A bundle containing 50 000 changesets in such repository get a 0.5% size
increase from such part for a -3% unbundling time speedup.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 21 Feb 2018 17:33:00 +0100 |
parents | c92d1d3c58ee |
children | d618558e4e8b |
line wrap: on
line diff
--- a/tests/test-debugbundle.t Wed Feb 21 17:26:22 2018 +0100 +++ b/tests/test-debugbundle.t Wed Feb 21 17:33:00 2018 +0100 @@ -34,12 +34,14 @@ changegroup -- {nbchanges: 2, version: 02} 0e067c57feba1a5694ca4844f05588bb1bf82342 991a3460af53952d10ec8a295d3d2cc2e5fa9690 + cache:rev-branch-cache -- {} Quiet output $ hg debugbundle --quiet bundle2.hg Stream params: {} changegroup -- {nbchanges: 2, version: 02} + cache:rev-branch-cache -- {} Verbose output: @@ -78,5 +80,6 @@ c b80de5d138758541c5f05265ad144ab9fa86d1db 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0000000000000000000000000000000000000000 0 + cache:rev-branch-cache -- {} $ cd ..