Benchmark: Git 1.6.3.3, Hg 1.3.1, Bzr 1.17

Jari Aalto jari.aalto at cante.net
Mon Aug 17 22:18:23 BST 2009


Jean-Francois Roy <bahamut at macstorm.org> writes:

> This data is a little bit concerning. It would seem, without digging
> too much into the methodology, that 2a has no appreciable impact on
> speed, although it seems competiive on size.

I was quite surprised myself too[1].

> I'm ready to accept that bzr is slower than git because of Python, but
> its discrepency versus hg is too large...

In practical terms, doing the every day add/ci, the impact probably isn't that
noticeable, but results are a bit concern.

New --2a clearly helps: the commit speed is slightly faster than in Hg.
The biggest difference between Bzr and Hg cloning:

    ...continue with 2.6.29 patch, 7552 files changed
                    Git 1.6.3.3     Hg 1.3.1        Bzr 1.17 (with --2a)    bzr(--2a) vs hg (%)
    add             6,30            0,50            3,00    3,5             600
    commit          0,50            28,00           37,00   24,00           -14
    log             0,01            0,13            0,17    0,19             46
>>  clone           49,00           40,00           71,00   71,00            78

If that can be cut in half, it would make a big difference in developing
features in separate branches.

> On another note Jari, unless you created a repository for bzr, the
> clone (or branch) operation is going to be much more expensive than
> without because it will copy the history data to the new branch.

Yes, that was typical "full clone" scenario.

> If you didn't make one, it would be nice to see numbers with a 2a
> repository.

I actually wanted to check if shared repositories would help, so I added
a test case (option --bzr-shared in script):

    ./.bzr  (shared repository)
    |
    +-- linux-source-2.6.30   (+1 big patch commit to donwgrade to 2.6.NN -1)
    |
    +- 1.branch  ( branch off linux-source-2.6.30 )
    +- 2.branch  ( branch off linux-source-2.6.30 )

    # test was done like this, measuring 'times' of the 'branch' commands

    cd linux-source-2.6.30/
    bzr init-repo -q --2a ..
    bzr init -q --2a
    bzr branch . ../1.branch
    bzr branch . ../2.branch

I didn't notice any performance difference.

The branching within shared repository gave similar numbers that plain
"full clone" to the other side of local disk:

    cd linux-source-2.6.30/
    bzr clone . /tmp/tmp-clone.bzr

Maybe I'm doing something wrong.

Please let me know if there is something that I could improve in tests [2].

Jari


[1] Data: http://www.editgrid.com/user/jaalto/vc-test
[2] Test script: http://cante.net/~jaalto/tmp/shell




More information about the bazaar mailing list