Usage discussion from the GNU Emacs project.
Jason Earl
jearl at notengoamigos.org
Wed Nov 25 23:18:54 GMT 2009
Óscar Fuentes <ofv at wanadoo.es> writes:
> Perfomance sucks. Having to distribute a tarball with the repository
> because bzr takes so long to clone "trunk" is a shame. It requires 23
> minutes with the http protocol over ADSL 6Mb, on a fast machine (bzr
> version 2.0). Besides, I discovered with much despair that cloning is
> a CPU-bound process for bzr, as cloning the same branch to a 1.6 GHz
> netbook over the local network with the sftp protocol took half an
> hour, with the CPU almost always at 100% (bzr version 2.1-b3).
Over the past year I have gotten a little bit tired of hearing about
bzr's poor performance. This is especially true when I believe that
git's supposed speed advantage is only imagined, and not actually
measured. I've checked out the Emacs repository using git on a regular
basis for the last year or so, and I did not remember this feat ever
taking less than 20 minutes.
So, just for fun, I checked out the git repository that the bzr
repository is created from.
time git clone git://repo.or.cz/emacs.git emacs-git-andreas
real 25m21.055s
user 13m17.734s
sys 1m8.396s
Then to be especially perverse I used a straight http url instead of the
special git server. This test was surprisingly bad.
time git clone http://repo.or.cz/r/emacs.git emacs-git-andreas2
real 117m28.122s
user 91m37.752s
sys 4m58.323s
Interestingly enough, the process was CPU bound almost the entire time.
For comparison bzr checkout of the trunk on this particular machine took
just over 30 minutes from bzr.savannah.gnu.org. Of course, the files
are being served up from a different host, so it is not a fair test.
But it should be noted that bzr is certainly in the ballpark performance
wise, and that is without the aid of a smart server.
The moral of the story is that if you are getting the entire history of
the Emacs project it is going to take a while, and using git doesn't
necessarily help.
And if you think bzr's progress indicator is bad you should see what
git's http progress indicator looks like. It was so bad that I actually
checked out the newest copy of git from the git repository so that I
could see if they had fixed it. I assumed that the output I got was due
to some sort of bug.
> While cloning, the progress bar is worse than useless. It gives no clue
> about how much remains to be done, so after 15 minutes of looking at it
> it turns from boring to annoying. Actually, it exacerbates the
> impression of bazaar's slowness.
I certainly agree that bzr's progress bar on http clones is sub par. It
is not as bad as git's http clone output.
<snip memory usage>
> For some reason,
>
> bzr branches http://bzr.savannah.gnu.org/r/emacs
>
> takes 5 minutes.
Yes, finding remote branches is basically always slow. I ran into that
while writing a script to mirror a repository locally.
> Performance of local operations is slow too. Using a fast machine
> (Intel Q6600, which is 2.4 GHz quad core, 8 MB Level 3 cache, 8 GB
> RAM, running on 64 bit mode, Kubuntu 9.10, ext 3 filesystem) no log or
> annotate operation that I tried takes less than 5 seconds, on files
> with lots of revisions and on files with just a few revisions. I've
> seen some cases that `bzr log' required 20 seconds before producing
> output (maybe due to a cold cache). This is not a problem for those
> who only have experience with CVS, but people who know git will feel
> uncomfortable and voice its frustration. This will not revert the
> decission of using bzr for emacs, but will damage bazaar's public
> image.
It is worse on the netbook that I use for testing.
bzr annotate ChangeLog > /dev/null
takes 56 seconds. Git can do the same thing in 15 seconds.
bzr log ChangeLog > /dev/null
takes 25 seconds. Git finishes in 6 seconds. More importantly git log
Changelog outputs the first page immediately. Bzr, not so much.
However, I remember (and not so fondly) when similar tricks on much
better hardware took 10 times as long. And either way bzr is much
better than cvs.
Jason
More information about the bazaar
mailing list