mercurial and bazaar timings

4 views
Skip to first unread message

Yarko Tymciurak

unread,
Dec 5, 2009, 2:34:29 PM12/5/09
to web2py-users
FYI - I made clean clones from both launchpad and google code /
mercurial today.

To ensure that the server was "queued" / cached, I did a checkout,
deleted my local clone, and then repeated the checkout (timed the
second time).

I think you will be pleased with the results - here's what I got
(Comcast broadband connection in Chicago):

hg : 0m2.589s (yes, seconds);
bzr: 12m54.025s (== 774.025);

That is about a 300 X improvement (more than two orders of magnitude).

Enjoy!

----------------------
~/workspace/web2py$ rm -rf clean-hg
~/workspace/web2py$ time hg clone https://web2py.googlecode.com/hg/
clean-hg
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 603 changes to 603 files
updating to branch default
603 files updated, 0 files merged, 0 files removed, 0 files unresolved

real 0m2.589s
user 0m1.192s
sys 0m0.172s
-----------------
~/workspace/web2py/clean-bzr$ rm -rf devel
~/workspace/web2py/clean-bzr$ time bzr branch lp:~mdipierro/web2py/
devel
You have not informed bzr of your Launchpad ID, and you must do this
to
write to Launchpad or access private data. See "bzr help launchpad-
login".
Branched 1423 revision
(s).

real 12m54.025s
user 0m20.629s
sys 0m6.340s

mdipierro

unread,
Dec 5, 2009, 2:46:09 PM12/5/09
to web2py-users
I can confirm. :-)

On Dec 5, 1:34 pm, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> FYI -  I made clean clones from both launchpad and google code /
> mercurial today.
>
> To ensure that the server was "queued" / cached, I did a checkout,
> deleted my local clone, and then repeated the checkout (timed the
> second time).
>
> I think you will be pleased with the results - here's what I got
> (Comcast broadband connection in Chicago):
>
> hg : 0m2.589s  (yes, seconds);
> bzr: 12m54.025s (== 774.025);
>
> That is about a 300 X improvement (more than two orders of magnitude).
>
> Enjoy!
>
> ----------------------
> ~/workspace/web2py$ rm -rf clean-hg
> ~/workspace/web2py$ time hg clonehttps://web2py.googlecode.com/hg/

Yarko Tymciurak

unread,
Dec 5, 2009, 4:27:38 PM12/5/09
to web2py-users
come to think of it, that might not be a "fair" timing:

web2py repository VERSIONS derived files (and binary ones at that) -
the *.w2p files;

That can create huge change sets....

Massimo - can you think of how to derive the *.w2p files, and NOT
check them in? This would be better, so that there would be a "make
distribution" which would create the w2p's ortherwise, if you get
source _you_ have to create them (e.g. make distrib, or something like
that).

Also - can you check-in a .hgignore file? That should be part of the
clone (e.g. *.pyc); if someone changes their local, it will just
merge, but by default we should have on in the repository which makes
sense.

Thanks,
Yarko

Thadeus Burgess

unread,
Dec 5, 2009, 7:26:47 PM12/5/09
to web...@googlegroups.com
I posted my sample .hgignore for a web2py project, should work *since
we don't want databases or sessions with the commits*

-Thadeus
> --
>
> You received this message because you are subscribed to the Google Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
>
>
>

Yarko Tymciurak

unread,
Dec 5, 2009, 8:12:38 PM12/5/09
to web2py-users
yes - we should include this in the repository (some .hgignore file).

It won't matter if people update for their needs, as it will just
merge....

but we should have a basic default .hgignore.

Martin Pool

unread,
Dec 6, 2009, 8:16:19 PM12/6/09
to web2py-users
On Dec 6, 6:34 am, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> FYI -  I made clean clones from both launchpad and google code /mercurialtoday.
>
> To ensure that the server was "queued" / cached, I did a checkout,
> deleted my local clone, and then repeated the checkout (timed the
> second time).
>
> I think you will be pleased with the results - here's what I got
> (Comcast broadband connection in Chicago):
>
> hg : 0m2.589s  (yes, seconds);
> bzr: 12m54.025s (== 774.025);
>
> That is about a 300 X improvement (more than two orders of magnitude).
>
> Enjoy!
>
> ----------------------
> ~/workspace/web2py$ rm -rf clean-hg
> ~/workspace/web2py$ time hg clonehttps://web2py.googlecode.com/hg/
> clean-hg
> requesting all changes
> adding changesets
> adding manifests
> adding file changes
> added 1 changesets with 603 changes to 603 files
> updating to branch default
> 603 files updated, 0 files merged, 0 files removed, 0 files unresolved
>
> real    0m2.589s
> user    0m1.192s
> sys     0m0.172s
> -----------------
> ~/workspace/web2py/clean-bzr$ rm -rf devel
> ~/workspace/web2py/clean-bzr$ time bzr branch lp:~mdipierro/web2py/
> devel
> You have not informed bzr of your Launchpad ID, and you must do this
> to
> write to Launchpad or access private data.  See "bzr help launchpad-
> login".
> Branched 1423 revision
> (s).
>
> real    12m54.025s
> user    0m20.629s
> sys     0m6.340s

Apologies (if they are wanted) for jumping into the middle of your
thread, but somebody posted this to the Bazaar list, so I wanted you
to understand what you're measuring here.

Firstly, you're using the http dumb transport against Launchpad. If
you use 'launchpad-login' to tell it your username, it will use bzr
+ssh which should be much faster. It's a bug that you have to do this
and it's not obvious you should. There has been some discussion
recently

Secondly, with Bazaar you are fetching 1423 revisions, whereas with
Mercurial you are fetching just a snapshot import. So in fact you're
pulling more than 300x as many revisions.

When I imported this snapshot into bzr and pushed it to Launchpad it
took:

mbp@grace% time bzr branch lp:~mbp/+junk/web2py-test /tmp/bzr
Branched 1 revision
(s).
HPSS calls: 10 (0 vfs) SmartSSHClientMedium(connected=False,
username=u'mbp', host='bazaar.launchpad.net', port=None)
bzr branch lp:~mbp/+junk/web2py-test /tmp/bzr 0.93s user 0.12s system
5% cpu 17.970 total

coming from Australia; admittedly still slower but I would say not an
unreasonable speed.

If you're using Bazaar and having trouble or if you're evaluating it
please talk to us, eg in #bzr on freenode. We would like to help and
to get feedback.

--
Martin

mdipierro

unread,
Dec 6, 2009, 10:28:58 PM12/6/09
to web2py-users
Hi Martin,

thank you for the clarification.

we have been using Launchpad for web2py for almost 2 years. I am very
happy with it. It is an excellent system. I personally use it for a
lot of projects. There was a lot of push from the community to move to
google code with mercurial (also motivated by the fact that Python
chose mercurial). I think we will continue to use both for a while
since the overhead is minimal.

Massimo

Alexander Belchenko

unread,
Dec 7, 2009, 6:01:27 PM12/7/09
to web2py-users
Just for the record.

Next time you will compare, try to compare similar history.

bzr repository has ~1500 revisions and it size ~600MB.
hg repository has only 3 revisions and its size ~6 MB.

Difference in 300 times don't make you think there is something wrong?

Anyway, good luck!

Yarko Tymciurak

unread,
Dec 7, 2009, 6:54:02 PM12/7/09
to web2py-users

On Dec 7, 5:01 pm, Alexander Belchenko <alexander.belche...@gmail.com>
wrote:
> Just for the record.
>
> Next time you will compare, try to compare similar history.
>
> bzr repository has ~1500 revisions and it size ~600MB.
> hg repository has only 3 revisions and its size ~6 MB.

Yes, indeed, Alexander --- as I and 3 others already pointed out, this
is true.

However, even for an up-to-date bzr, an update of 5 files (one rev)
took

real 0m13.736s

Repeating the same sort of pull from googlecode / hg, to the first hg
checkin:

hg clone -r be4727e88e https://web2py.googlecode.com/hg/ clean-hg

and then updating with the last 3 changesets:

time hg update

produces this result:

added 3 changesets with 10 changes to 7 files
(run 'hg update' to get a working copy)

real 0m1.048s
user 0m0.164s
sys 0m0.044s

(I didn't count "bzr ci" nor "hg update" in either of these).

Still, this is 13 times difference.

So empirically, this is still noticably (significantly) different,
but more on the order of one order of magnitude (rather than
serveral).

Regards,
- Yarko

Thadeus Burgess

unread,
Dec 7, 2009, 9:19:34 PM12/7/09
to web...@googlegroups.com
There are many.... many... many comparisons on version control systems
and times.

Read this, and we can stop doing our own tests :)

http://www.infoq.com/articles/dvcs-guide

Want an even better description of the differences of each of the systems

http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Mercurial/Subversion/index.html

How about home directory versioning

http://joshcarter.com/productivity/svn_hg_git_for_home_directory

Needless to say, the statistics speak for themselves :)

-Thadeus

dmuir

unread,
Dec 7, 2009, 11:25:59 PM12/7/09
to web2py-users
Thadeus,
Apologies for butting in on this list... but the links you gave show
exactly why it's important to run your own tests. The comparisons are
*very* out-dated. There have been over 16 releases of Bazaar since
then. I don't follow hg or git development, but I'm guessing they've
had a few releases since then as well...

Overall, Yarko's comparisons are more between Launchpad and Google
Code than bzr vs hg.

Cheers,
David


On Dec 8, 11:19 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> There are many.... many... many comparisons on version control systems
> and times.
>
> Read this, and we can stop doing our own tests :)
>
> http://www.infoq.com/articles/dvcs-guide
>
> Want an even better description of the differences of each of the systems
>
> http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Mercurial/Sub...
>
> How about home directory versioning
>
> http://joshcarter.com/productivity/svn_hg_git_for_home_directory
>
> Needless to say, the statistics speak for themselves :)
>
> -Thadeus
>
> On Mon, Dec 7, 2009 at 5:54 PM, Yarko Tymciurak
>

Yarko Tymciurak

unread,
Dec 8, 2009, 3:22:57 AM12/8/09
to web2py-users

On Dec 7, 10:25 pm, dmuir <davidkm...@gmail.com> wrote:
> Thadeus,
> Apologies for butting in on this list... but the links you gave show
> exactly why it's important to run your own tests. The comparisons are
> *very* out-dated. There have been over 16 releases of Bazaar since
> then. I don't follow hg or git development, but I'm guessing they've
> had a few releases since then as well...
>
> Overall, Yarko's comparisons are more between Launchpad and Google
> Code than bzr vs hg.

*sigh* - yes, it would appear that _might_ be so, and I agree - you
should take your own measures...

Let me look at a machine local hg clone of the same, and compare it to
a machine local bzr branch. The way I did this: the web2py hg clone
from google code copied, revision history cleared, and then the tree
init'd with each, and then cloned/branched.

hg : 0.514s
bzr: 2.236s

so now it's only ~1/2 an order of magnitude difference (Bigtable, and
Google resources no doubt had impact).

The thing I will point out, regardless of the numbers, the experience
is born out. Yes, we made it _much_ worse by vresioning compressed
tar files (shame on us); this really exacerbated the situation.
Even so, the feel of hg has always seemed faster (locally, you can
_feel_ this), and these numbers (however empirical) so far bear that
out.

Regards,
- Yarko
---------------------------
~/workspace/web2py$ rm -rf local-hg
~/workspace/web2py$ time hg clone clean-hg-hg local-hg
updating to branch default
603 files updated, 0 files merged, 0 files removed, 0 files unresolved

real 0m0.514s
user 0m0.364s
sys 0m0.152s
~/workspace/web2py$ hg --version
Mercurial Distributed SCM (version 1.4.1)
------------------------------------
~/workspace/web2py$ rm -rf local-bzr
~/workspace/web2py$ time bzr branch clean-hg-bzr local-bzr
Branched 1 revision
(s).

real 0m2.236s
user 0m1.880s
sys 0m0.248s
~/workspace/web2py$ bzr --version
Bazaar (bzr) 2.0.2
Python interpreter: /usr/bin/python 2.6.2
Python standard library: /usr/lib/python2.6
Platform: Linux-2.6.28-17-generic-i686-with-Ubuntu-9.04-jaunty
bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
Bazaar configuration: ~/.bazaar
Bazaar log file: ~/.bzr.log

Thadeus Burgess

unread,
Dec 8, 2009, 3:32:29 AM12/8/09
to web...@googlegroups.com
And the comparisons still hold true to this day (noting Yarko's post)

:)

Do I really need to google for comparisons on launchpad vs google
code... really? They exist... you know, good comparisons, lots of
data... even data within the last 3 months... but I'll let you go to
the trouble of finding it.

dmuir

unread,
Dec 8, 2009, 8:03:25 AM12/8/09
to web2py-users
Yarko,
Thanks for the updated benchmark. Will pass it on to bzr devs. Indeed,
bzr is a bit slower than hg, and I'd love to see that performance gap
closed.
All the best with web2py!

Cheers,
David


On Dec 8, 5:22 pm, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> ~/workspace/web2py$ hg --versionMercurialDistributed SCM (version 1.4.1)

Yarko Tymciurak

unread,
Dec 8, 2009, 11:09:38 AM12/8/09
to web2py-users
On Dec 8, 7:03 am, dmuir <davidkm...@gmail.com> wrote:
> Yarko,
> Thanks for the updated benchmark. Will pass it on to bzr devs. Indeed,
> bzr is a bit slower than hg, and I'd love to see that performance gap
> closed.
> All the best with web2py!
>
> Cheers,
> David

No worries, David -

there are still no doubt other things at play. Linux version was
listed in my last post.
Machine is 4G RAM (3.6G available) AMD Phenom 9500 Quad Core (see more
at: http://2linices.blogspot.com/2009/06/kickoff.html).

- Yarko

Yarko Tymciurak

unread,
Dec 8, 2009, 11:50:25 AM12/8/09
to web2py-users
On Dec 8, 10:09 am, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> On Dec 8, 7:03 am, dmuir <davidkm...@gmail.com> wrote:
>
> > Yarko,
> > Thanks for the updated benchmark. Will pass it on to bzr devs. Indeed,
> > bzr is a bit slower than hg, and I'd love to see that performance gap
> > closed.
> > All the best with web2py!
>
> > Cheers,
> > David
>
> No worries, David -
>
> there are still no doubt other things at play.  Linux version was
> listed in my last post.
> Machine is 4G RAM (3.6G available) AMD Phenom 9500 Quad Core (see more
> at:http://2linices.blogspot.com/2009/06/kickoff.html).

...sorry; my mistake that should be 3.2G RAM available (32 bit
Ubuntu; I looked from a 64bit Fedora boot;).

Martin Pool

unread,
Dec 8, 2009, 7:42:56 PM12/8/09
to web2py-users
On Dec 8, 7:22 pm, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> On Dec 7, 10:25 pm, dmuir <davidkm...@gmail.com> wrote:
>
> > Thadeus,
> > Apologies for butting in on this list... but the links you gave show
> > exactly why it's important to run your own tests. The comparisons are
> > *very* out-dated. There have been over 16 releases of Bazaar since
> > then. I don't follow hg or git development, but I'm guessing they've
> > had a few releases since then as well...
>
> > Overall, Yarko's comparisons are more between Launchpad and Google
> > Code than bzr vs hg.

I think that's true, and in particular probably two things:

* Launchpad running over ssh which has much more startup overhead
than http <https://bugs.edge.launchpad.net/launchpad-code/+bug/165087>
* Google (and maybe Yarko?) being in the US, and Launchpad in the UK

> *sigh* - yes, it would appear that  _might_ be so, and I agree - you
> should take your own measures...
>
> Let me look at a machine local hg clone of the same, and compare it to
> a machine local bzr branch.  The way I did this:  the web2py hg clone
> from google code copied, revision history cleared, and then the tree
> init'd with each, and then cloned/branched.
>
> hg :  0.514s
> bzr:  2.236s
>
> so now it's only ~1/2 an order of magnitude difference (Bigtable, and
> Google resources no doubt had impact).

Thanks for being open to re-measuring this. It's not quite apples-to-
apples because hg will be hardlinking the repository files whereas bzr
does not - there are pros and cons to this but I won't repeat them
here. At any rate the recommended setup with Bazaar is to make a
shared repository directory, and that causes Bazaar to do similar work
to hg.

With that, on my machine:

bzr init-repo test
rm -r foo/.hg
bzr init foo
bzr add foo
bzr ci -m snapshot foo

mbp@grace% time bzr branch foo bar
Branched 1 revision
(s).
bzr branch foo bar 0.63s user 0.10s system 94% cpu 0.776 total

> The thing I will point out, regardless of the numbers, the experience
> is born out.   Yes, we made it _much_ worse by vresioning compressed
> tar files (shame on us); this really exacerbated the situation.
> Even so, the feel of hg has always seemed faster (locally, you can
> _feel_ this), and these numbers (however empirical) so far bear that
> out.

If it does seem to you that it feels faster, then that's true, and I
would expect there are cases where hg is somewhat faster. In
particular we load more Python files when getting started than we
should, and this causes lag especially on a cold cache. But in our
measurements it is normally pretty close, so if there are things where
it is enough to be a problem, we'd really like to either know about
them or help you find ways around it.

--
Martin

Yarko Tymciurak

unread,
Dec 9, 2009, 1:10:18 AM12/9/09
to web2py-users
On Dec 8, 6:42 pm, Martin Pool <martinp...@gmail.com> wrote:
> On Dec 8, 7:22 pm, Yarko Tymciurak <resultsinsoftw...@gmail.com>
> wrote:
>
> > On Dec 7, 10:25 pm, dmuir <davidkm...@gmail.com> wrote:
>
....
>
> Thanks for being open to re-measuring this.  It's not quite apples-to-
> apples because hg will be hardlinking the repository files whereas bzr
> does not - there are pros and cons to this but I won't repeat them
> here.  At any rate the recommended setup with Bazaar is to make a
> shared repository directory, and that causes Bazaar to do similar work
> to hg.

Hi Martin -

Thanks for your insights and helpful posts; obviously, I just use an
SCM to keep things together, and think about it as little as possible.

Regards,

- Yarko

dmuir

unread,
Dec 9, 2009, 8:04:50 AM12/9/09
to web2py-users
On Dec 9, 1:50 am, Yarko Tymciurak <resultsinsoftw...@gmail.com>
wrote:
> On Dec 8, 10:09 am, Yarko Tymciurak <resultsinsoftw...@gmail.com>
> wrote:
>
>
>
> > On Dec 8, 7:03 am, dmuir <davidkm...@gmail.com> wrote:
>
> > > Yarko,
> > > Thanks for the updated benchmark. Will pass it on to bzr devs. Indeed,
> > > bzr is a bit slower than hg, and I'd love to see that performance gap
> > > closed.
> > > All the best with web2py!
>
> > > Cheers,
> > > David
>
> > No worries, David -
>
> > there are still no doubt other things at play.  Linux version was
> > listed in my last post.
> > Machine is 4G RAM (3.6G available) AMD Phenom 9500 Quad Core (see more
> > at:http://2linices.blogspot.com/2009/06/kickoff.html).
>
> ...sorry; my mistake  that should be 3.2G RAM available (32 bit
> Ubuntu; I looked from a 64bit Fedora boot;).
>
>
>
> > - Yarko
>

Yeah, I upgraded to 64 bit because of that.
The alternative it to swap to the server kernel which supports PAE (no
idea why the desktop kernel doesn't...)
Reply all
Reply to author
Forward
0 new messages