If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions

Wednesday, July 09, 2008

bazaar is slow - who cares?

BS: git is faster than mercurial is faster than bazaar!
ME: Frankly dear, I don't give a damn.
BS: But speed is important!
ME: It is. However when you choose a source control system (if you have the
privilege of doing so), there are many more things to consider:
  • Does it fit my work model?
  • Is it stable?
  • Will it stay for long?
  • What's the community like?
  • Is development active?
  • ...
  • Is it fast enough?
BS: But bazaar is the slowest
ME: For many, many projects, it's fast enough
BS: So who too choose?
ME: You do your own math. I chose `bazaar` because it has two features that
the others (to my knowledge) don't have:
  • It knows about directories (I like to check-in empty logs directory - it simplifies the logging code)
  • You can check-in files from another directory (see here)
And, it's fast enough for me (about 1sec for bzr st on ~200K LOC)

BS: OK! ... but git storage is better than mercurial is better than bazaar!
ME: <sigh> Why do I even bother? </sigh> ...

Next week - LISP is faster than Python ;)

BS = blogosphere
ME = me

UPDATE (2009/01/27)
Bazaar slowness started to annoy me too much. I felt that every "bzr st" was taking way to much time (not to mention the updated). So I switched to mercurial.

The difference in timing is even noticeable in the most trivial operations:

[09:19] $time hg --version > /dev/null

real 0m0.060s
user 0m0.048s
sys 0m0.012s
[09:20] fattoc $time bzr --version > /dev/null

real 0m0.191s
user 0m0.144s
sys 0m0.048s
[09:21] $

You feel this 0.13 seconds. It seems that hg --version return immediately but bzr --version takes it's time.

Sometimes speed *does* matter.


Jakub Narebski said...

If the difference of speed is between 10 minutes and few seconds (and if I remember correctly for some commands there is or was such speed difference between Bazaar and Git or Mercurial, for repositories with many files, deep directory structure, and long history), speed is important.

As to "can check-in files from another directory" (as I understand: without explicitely stating the repository): how it could work when there can be one repository inside other repository working directory (independent or dependent)?

What I have slightly against Bazaar is associating working directory and repository data with single branch (although repository data can be shared among branches if you know how to do this).

But I agree that you should choose DVCS based on features which are important to you.

Miki Tebeka said...

I agree that speed *is* important if the application is too slow.

My rules of thumb (YYMV) is sub second for most common operations and sub 10min for all the rest. And of course there are exceptions (the initial bazaar checkout is usually long, but you do it once per project).

Jakub Narebski said...

@Miki: True, but it of course depends which commands you take as common (seconds or sub-second) and which un-common (below 10 minutes).

If merge takes long time, you would avoid merges and test merge (checking if your changes would merge cleanly for example, during development). If commit takes long time, you would make few commits with changes clumped together. Etc., etc.

Blog Archive