Comment 4 for bug 116094

Revision history for this message
Robert Collins (lifeless) wrote : Its not obvious that bzr branch is safer than hg clone

On Sun, 2007-07-08 at 15:06 +0000, JussiP wrote:
> I have the following bzr repo:

> I converted it to hg and git using tailor. I measured the time taken to
> branch the repo. Every test was done twice and only the last one was
> measured, so the source repo would be in cache. I also tested cp since
> bzr docs say you can branch with it as well. Here are the results:
>
> bzr branch 43.21s user 4.98s system 94% cpu 51.174 total

You are clearly not using a shared repository; shared repositories
provide shared storage between branches and will massively increase the
performance of branch.

> hg clone 4.63s user 1.48s system 93% cpu 6.546 total
>
> git clone 3.68s user 0.86s system 92% cpu 4.933 total
>
> cp 0.16s user 2.09s system 17% cpu 12.811 total
>
> Bzr is clearly the slowest. It should not be noticeably slower than cp.

There are some hidden assumptions here. The first is that bzr branch is
equivalent to cp - its not. bzr branch is performing integrity checking
on the repository as it copies data, which cp does not do (and its
likely your hg clone does not do that either as hg defaults to
hardlinking - which means that we know the entire branch history is
valid, but you don't with hg).

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.