comparison tests/test-bundle-phases.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 626a28f30dbd
children d618558e4e8b
comparison
equal deleted inserted replaced
36970:79b73be4dda5 36971:b89a7ef29013
40 Stream params: {Compression: BZ} 40 Stream params: {Compression: BZ}
41 changegroup -- {nbchanges: 3, targetphase: 2, version: 02} 41 changegroup -- {nbchanges: 3, targetphase: 2, version: 02}
42 26805aba1e600a82e93661149f2313866a221a7b 42 26805aba1e600a82e93661149f2313866a221a7b
43 f585351a92f85104bff7c284233c338b10eb1df7 43 f585351a92f85104bff7c284233c338b10eb1df7
44 9bc730a19041f9ec7cb33c626e811aa233efb18c 44 9bc730a19041f9ec7cb33c626e811aa233efb18c
45 cache:rev-branch-cache -- {}
45 phase-heads -- {} 46 phase-heads -- {}
46 26805aba1e600a82e93661149f2313866a221a7b draft 47 26805aba1e600a82e93661149f2313866a221a7b draft
47 $ hg strip --no-backup C 48 $ hg strip --no-backup C
48 $ hg unbundle -q bundle 49 $ hg unbundle -q bundle
49 $ rm bundle 50 $ rm bundle
231 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 232 426bada5c67598ca65036d57d9e4b64b0c1ce7a0
232 112478962961147124edd43549aedd1a335e44bf 233 112478962961147124edd43549aedd1a335e44bf
233 dc0947a82db884575bb76ea10ac97b08536bfa03 234 dc0947a82db884575bb76ea10ac97b08536bfa03
234 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4 235 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4
235 03ca77807e919db8807c3749086dc36fb478cac0 236 03ca77807e919db8807c3749086dc36fb478cac0
237 cache:rev-branch-cache -- {}
236 phase-heads -- {} 238 phase-heads -- {}
237 dc0947a82db884575bb76ea10ac97b08536bfa03 public 239 dc0947a82db884575bb76ea10ac97b08536bfa03 public
238 03ca77807e919db8807c3749086dc36fb478cac0 draft 240 03ca77807e919db8807c3749086dc36fb478cac0 draft
239 $ hg strip --no-backup A 241 $ hg strip --no-backup A
240 $ hg unbundle -q bundle 242 $ hg unbundle -q bundle
256 $ hg debugbundle bundle 258 $ hg debugbundle bundle
257 Stream params: {Compression: BZ} 259 Stream params: {Compression: BZ}
258 changegroup -- {nbchanges: 2, targetphase: 2, version: 02} 260 changegroup -- {nbchanges: 2, targetphase: 2, version: 02}
259 112478962961147124edd43549aedd1a335e44bf 261 112478962961147124edd43549aedd1a335e44bf
260 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4 262 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4
263 cache:rev-branch-cache -- {}
261 phase-heads -- {} 264 phase-heads -- {}
262 $ rm bundle 265 $ rm bundle
263 266
264 $ hg bundle --base A -r D bundle 267 $ hg bundle --base A -r D bundle
265 3 changesets found 268 3 changesets found
267 Stream params: {Compression: BZ} 270 Stream params: {Compression: BZ}
268 changegroup -- {nbchanges: 3, targetphase: 2, version: 02} 271 changegroup -- {nbchanges: 3, targetphase: 2, version: 02}
269 112478962961147124edd43549aedd1a335e44bf 272 112478962961147124edd43549aedd1a335e44bf
270 dc0947a82db884575bb76ea10ac97b08536bfa03 273 dc0947a82db884575bb76ea10ac97b08536bfa03
271 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4 274 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4
275 cache:rev-branch-cache -- {}
272 phase-heads -- {} 276 phase-heads -- {}
273 dc0947a82db884575bb76ea10ac97b08536bfa03 public 277 dc0947a82db884575bb76ea10ac97b08536bfa03 public
274 $ rm bundle 278 $ rm bundle
275 279
276 $ hg bundle --base 'B + C' -r 'D + E' bundle 280 $ hg bundle --base 'B + C' -r 'D + E' bundle
278 $ hg debugbundle bundle 282 $ hg debugbundle bundle
279 Stream params: {Compression: BZ} 283 Stream params: {Compression: BZ}
280 changegroup -- {nbchanges: 2, targetphase: 2, version: 02} 284 changegroup -- {nbchanges: 2, targetphase: 2, version: 02}
281 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4 285 4e4f9194f9f181c57f62e823e8bdfa46ab9e4ff4
282 03ca77807e919db8807c3749086dc36fb478cac0 286 03ca77807e919db8807c3749086dc36fb478cac0
287 cache:rev-branch-cache -- {}
283 phase-heads -- {} 288 phase-heads -- {}
284 03ca77807e919db8807c3749086dc36fb478cac0 draft 289 03ca77807e919db8807c3749086dc36fb478cac0 draft
285 $ rm bundle 290 $ rm bundle