On Tue, 2008-03-18 at 17:43 +0200, Teemu Likonen wrote: > I did some benchmarking in git and bzr repositories of Emacs. Some > numbers: 89711 revisions (by "git log --pretty=oneline | wc -l"), 2825 > files. Both repositories seem to have just linear history converted from > CVS repo. Both have the same head revision which is > 481c2a1e31f32c8aa0fb6d504575b75a18537788 (git) and > revid:cvs-1:tsdh-20080318180244-lxbzttdnh6ecqbka (bzr). > Hi, Thanks for the concrete numbers that we can work from. So, I hacked up a quick plugin to output logs in a flat style like git. I've attached it to this mail. You can install it by dropping it in to ~/.bazaar/plugins. It is totally unintegrated with bzr's log framework. I plan on rectifying that and proposing it for inclusion. It also has some nasty UI warts like using --end revid to limit the revisions that you want to see to ones that are not that revid or the parents of it. This means you can't do things like bzr flatlog -r-100.. I include the numbers from that inline with yours > > Viewing history > --------------- > > > The complete history: > > $ time git log >/dev/null > real 0m5.741s > > $ time bzr log >/dev/null > real 3m15.708s > bzr flatlog > /dev/null 45.17s user 0.75s system 97% cpu 46.883 total > > Last 100 revisions: > > $ time git log -100 >/dev/null > real 0m0.011s > > $ time bzr log -l100 >/dev/null > real 2m10.270s > bzr flatlog -l100 > /dev/null 12.11s user 0.32s system 97% cpu 12.714 total > > Last 10 revisions: > > $ time git log -10 >/dev/null > real 0m0.007s > > $ time bzr log -l10 >/dev/null > real 2m9.163s > bzr flatlog -l10 > /dev/null 12.18s user 0.25s system 98% cpu 12.582 total I can also suggest a workaround for anyone that is using bzr and wants to speed up log further while we work on it. If you edit ~/.bazaar/bazaar.conf and add [ALIASES] flatlog = --end cvs-1:bastien1-20080217010841-op363t09ccs7pais you can get bzr flatlog --end cvs-1:bastien1-20080217010841-op363t09ccs7pais > /dev/null 0.77s user 0.08s system 96% cpu 0.876 total and still have 1000 revisions to look at. I'll work on getting -r properly integrated which means you could have this alias set at all times, and then if you needed full history you could do bzr flatlog -r1.. > > Creating a branch > ----------------- > > With git I chose "git checkout -b" instead of "git branch" because the > former also checks out the files as does "bzr branch". The bzr branch is > created inside the same shared repository so that the common objects are > shared. bzr creates a second working tree, git replaces your first. > > > Create new topic branch based on the head revision of the main > development branch: > > $ time git checkout -b topic master >/dev/null > real 0m0.062s > > $ time bzr branch trunk topic >/dev/null > real 0m7.249s to compare getting the second working tree you can use git clone emacs temp2 1.70s user 1.29s system 31% cpu 9.395 total (it hardlinks the objects rather than just re-using them as bzr does, so it's still not the same) However this is a bit silly, as you are just comparing the usual ways to get a new branch in that particular VCS. It is possible to emulate the git way using a couple of bzr commands if you prefer to work in one directory with one working tree. I don't have benchmark numbers for that currently though I'm afraid. > > > Create new topic branch based on earlier revision of main development > branch: > > $ time git checkout -b topic master~4 >/dev/null > real 0m0.085s > > $ time bzr branch -r -5 trunk topic >/dev/null > real 2m51.551s > There was a patch proposed a couple of days to tackle an efficiency operation in exactly this command. > > > Compare branches' commit histories > ---------------------------------- > > In above benchmark I created branch 'topic' which is based on earlier > revision of main development branch. In this test I compared commands > which display commits that are missing from 'topic' branch compared to > the main development branch (four commits in total). > > > $ time git log topic..master >/dev/null > real 0m0.006s > > $ time bzr missing --theirs-only ../trunk >/dev/null > real 18m25.173s > An inefficiency was also highlighted here a couple of days ago. I think something was proposed that we could switch this and other commands to that would speed them up greatly. If you want to talk about bzr's performance or features I will be happy to do so, but please drop the emacs list from the discussion. Thanks, James