From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.comp.version-control.bazaar-ng.general,gmane.emacs.devel Subject: Re: Emacs repository benchmark: bzr and git (rerun) Date: Wed, 19 Mar 2008 13:37:42 +0200 Message-ID: <200803191337.42928.tlikonen@iki.fi> References: <20080318154316.GA6242@mithlond.arda.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: Quoted-Printable X-Trace: ger.gmane.org 1205926680 18026 80.91.229.12 (19 Mar 2008 11:38:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Mar 2008 11:38:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: bazaar@lists.canonical.com Original-X-From: bazaar-bounces@lists.canonical.com Wed Mar 19 12:38:26 2008 Return-path: Envelope-to: gcvbg-bazaar-ng@m.gmane.org Original-Received: from chlorine.canonical.com ([91.189.94.204]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jbwcj-00014z-Vs for gcvbg-bazaar-ng@m.gmane.org; Wed, 19 Mar 2008 12:38:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1Jbwc5-00051L-IB; Wed, 19 Mar 2008 11:37:45 +0000 Original-Received: from pne-smtpout3-sn2.hy.skanova.net ([81.228.8.111]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1Jbwc4-000516-1H for bazaar@lists.canonical.com; Wed, 19 Mar 2008 11:37:44 +0000 Original-Received: from [192.168.0.2] (80.220.180.181) by pne-smtpout3-sn2.hy.skanova.net (7.3.129) id 478BDB9600376C68; Wed, 19 Mar 2008 12:37:43 +0100 User-Agent: KMail/1.9.5 In-Reply-To: <20080318154316.GA6242@mithlond.arda.local> Content-Disposition: inline X-BeenThere: bazaar@lists.canonical.com X-Mailman-Version: 2.1.8 Precedence: list List-Id: bazaar discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bazaar-bounces@lists.canonical.com Errors-To: bazaar-bounces@lists.canonical.com Xref: news.gmane.org gmane.comp.version-control.bazaar-ng.general:38960 gmane.emacs.devel:92973 Archived-At: Teemu Likonen kirjoitti: > I did some benchmarking in git and bzr repositories of Emacs. Some > numbers: 89711 revisions (by "git log --pretty=3Doneline | 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). > > Repositories/branches are pulled from here: > git: git://git.sv.gnu.org/emacs.git > bzr: http://bzr.notengoamigos.org/emacs/trunk/ > > My system is AMD Sempron 3000+ with 2 GB memory and it's running > Debian GNU/Linux 4.0. I'm using the latest development versions of > both git (1.5.5.rc0.6.gdeda) and bzr (1.4dev). I just measured with > 'time' command how long it takes to run certain commands. Hey! I realised that the emacs bzr repository was not fully optimized=20 with "bzr pack" command. By running this command it really improves the=20 performance of bzr; now I'm getting similar numbers as some of you. I=20 really apologise for the misleading information I have spread. I want=20 to correct my mistakes by running my tests again (see below). This raises questions though. I had downloaded the premade emacs bzr=20 repo from and it seems to have its repo=20 pretty much optimized since it performs much better than my previous=20 benchmark. I had done almost nothing with the repository after that,=20 just some bzr-pulls and performance tests. How come the emacs bzr=20 repository slows down so much and so quickly? My experience is that you=20 definitely want to run "bzr pack" quite often. Anyway, here are the same tests with bzr-packed and git-gc'd=20 repositories. This test shows that both have improved their=20 performance, especially bzr. I did run all the tests three times to see=20 if caches have effect. They didn't: all the three runs gave very much=20 the same numbers. I picked up the best one anyway. Again, I'm really sorry about my previous tests. > Viewing history > --------------- I want to point out that in git you can always see the log=20 _immediately_, no matter how long it takes to display the whole thing.=20 In bzr these numbers reflect pretty much the time to get anything=20 visible at all after entering the command. > The complete history: > > $ time git log >/dev/null > real =A0 =A00m5.741s > > $ time bzr log >/dev/null > real =A0 =A03m15.708s git: 0m3.348s bzr: 1m15.143s > Last 100 revisions: > > $ time git log -100 >/dev/null > real 0m0.011s > > $ time bzr log -l100 >/dev/null > real 2m10.270s git: 0m0.009s bzr: 0m26.562s > Last 10 revisions: > > $ time git log -10 >/dev/null > real 0m0.007s > > $ time bzr log -l10 >/dev/null > real 2m9.163s git: 0m0.005s bzr: 0m25.519s > The complete history of a single file: > > $ time git log src/keymap.c >/dev/null > real 0m9.240s > (The same as above but with detecting and following possible > renames:) $ time git log --follow src/keymap.c >/dev/null > real 0m17.891s > > $ time bzr log src/keymap.c >/dev/null > real 3m35.431s git: 0m5.127s git: 0m8.953s (with --follow) bzr: 0m55.461s > Differences between revisions > ----------------------------- > View changes introduced in given revision: > > (This shows also the commit message, author and date.) > $ time git show 2635714f3dac5f24eb1997cbf97285810f6799c0 >/dev/null > real 0m0.012s > > $ time bzr diff -c revid:cvs-1:wohler-20080318101724-c3ofm3vslli3wfwl > >/dev/null real 2m40.467s git: 0m0.010s bzr: 0m23.315s > Show differences between two revisions: > > $ time git diff HEAD~10..HEAD~4 >/dev/null > real 0m0.076s > > $ time bzr diff -r -11..-5 >/dev/null > real 2m44.214s git: 0m0.068s bzr: 0m24.140s > $ time git diff HEAD~4.. >/dev/null > real 0m0.072s > > $ time bzr diff -r -5.. >/dev/null > real 1m21.836s git: 0m0.060s bzr: 0m12.889s > 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. > > > 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 git: 0m0.043s bzr: 0m4.504s > 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 git: 0m0.062s bzr: 0m30.120s > 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 git: 0m0.004s bzr: 13m48.239s > Annotate/blame a file (src/keymap.c) > ------------------------------------ > > $ time git blame src/keymap.c >/dev/null > real 0m8.753s > > $ time bzr blame src/keymap.c >/dev/null > real 0m58.296s git: 0m7.954s bzr: 0m17.114s