I just did a test with the provided Python 2.x repos from the DVCS PEP for Python to check the performance of Bazaar and Mercurial.
(this is a slightly changed version of a mail posted to the mercurial list: http://selenic.com/pipermail/mercurial/2008-November/022199.html )
All these tests are done only once with some mostly constant load, so they don't qualitfy as scientific tests, but they give a good impressing of the differences between Bazaar (bzr) and Mercurial (hg).
- Bazaar 1.5
- Mercurial 1.0.2
These are the ones which are marked as stable in my Gentoo tree (amd64).
First test: initial cloning from the web.
With repositories containing the same changesets (roughly, since bzr tracks dir name changes) Mercurial is about 9 times faster than Bazaar.
$ time bzr branch http://code.python.org/python/trunk
No handlers could be found for logger "bzr"
 2008-11-05 11:36:44.358 INFO: Branched 40626 revision(s).
Branched 40626 revision(s).
$ time hg clone http://code.python.org/hg/trunk/ python-hg-trunk
requesting all changes
adding file changes
added 40556 changesets with 86253 changes to 8166 files
updating working directory
3922 files updated, 0 files merged, 0 files removed, 0 files unresolved
>>> (24.0 + 0.44 / 60 ) / ( 2 + 40.237 / 60 )
And hg only uses about half as much space as bzr for the repository data (with bzr 1.5 that is - that was the stable version in my Gentoo tree as of 2008-10-31):
$ du -hs python-bzr-trunk/.bzr python-hg-trunk/.hg
Second test: a full log.
A full bzr log takes about 2.5 times as long as a full hg log in the cloned python 2.x repositories (so hg log is about 2.5 times faster than bzr log):
$ time bzr log
$ time hg log
>>> (1 + 10.258/60) / (27.886 / 60)
As I understand it, the new revlog in C should give Mercurial another nice speedup here (am I right in that?).
Third test: local clones.
A local clone in Mercurial is about 11 times faster than a local clone in bzr.
$ time bzr branch python-bzr-trunk/ python-bzr-trunk2
$ time hg clone python-hg-trunk python-hg-trunk2
A second run (backwards, with hot filesystem caches) gave even stronger results:
$ rm -r clone python-hg-trunk
$ time hg clone python-hg-trunk2 python-hg-trunk
With bzr I first cloned backwards to heat up the filesystem caches and then cloned again:
$ rm -r python-bzr-trunk
$ bzr branch python-bzr-trunk2 python-bzr-trunk
$ rm -r python-bzr-trunk2
$ time bzr branch python-bzr-trunk python-bzr-trunk2
Result: bzr is unusable for quick local clones of not-so-small projects.
$ #cold copy of .hg
$ time cp -r python-hg-trunk/.hg tmp-hg
# hot copy of .bzr
$ time cp -r python-bzr-trunk/.bzr tmp-bzr
# hot copy of .hg
$ rm -r tmp-hg
$ time cp -r python-hg-trunk/.hg tmp-hg
To alleviate some doubts about system load: this is what top gave while I did the first local clone of the bzr repo:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23202 arne 21 1 359m 255m 3412 R 70.1 12.7 1:39.33 bzr
CPU load due to bzr moved between 60% and 80% while cloning.
The general load on the system while running bzr commands was about the same as while running hg commands (I compiled stuff with niceness 11 = low priority).
Result: So Mercurial is far faster than bzr, while being a lot more newbie friendly than git (especially when the newbies are former svn users - Python currently uses svn).
⚙ Babcom is trying to load the comments ⚙
This textbox will disappear when the comments have been loaded.
Note: To make a comment which isn’t a reply visible to others here, include a link to this site somewhere in the text of your comment. It will then show up here. To ensure that I get notified of your comment, also include my Sone-ID.
Link to this site and my Sone ID:
This spam-resistant comment-field is made with babcom.
The European Copyright directive threatens online communication in Europe.
But thanks to massive shared action earlier this year, the European parliament can still prevent the problems. For each of the articles there are proposals which fix them. The parliamentarians (MEPs) just have to vote for them. And since they are under massive pressure from large media companies, that went as far as defaming those who took action as fake people, the MEPs need to hear your voice to know that your are real.
If you care about the future of the Internet in the EU, please Call your MEPs.