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: Emacs repository benchmark: bzr and git Date: Tue, 18 Mar 2008 17:43:16 +0200 Message-ID: <20080318154316.GA6242@mithlond.arda.local> References: <87skyvse7k.fsf@xmission.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205855013 10243 80.91.229.12 (18 Mar 2008 15:43:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 15:43:33 +0000 (UTC) To: emacs-devel@gnu.org, bazaar@lists.canonical.com Original-X-From: bazaar-bounces@lists.canonical.com Tue Mar 18 16:44:01 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 1Jbdyn-0005Af-BP for gcvbg-bazaar-ng@m.gmane.org; Tue, 18 Mar 2008 16:43:57 +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 1JbdyD-00031Z-51; Tue, 18 Mar 2008 15:43:21 +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 1JbdyA-00031K-Q5 for bazaar@lists.canonical.com; Tue, 18 Mar 2008 15:43:18 +0000 Original-Received: from mithlond.arda.local (80.220.180.181) by pne-smtpout3-sn2.hy.skanova.net (7.3.129) id 478BDB9600369D64; Tue, 18 Mar 2008 16:43:17 +0100 Original-Received: from dtw by mithlond.arda.local with local (Exim 4.63) (envelope-from ) id 1Jbdy8-0001if-I1; Tue, 18 Mar 2008 17:43:16 +0200 Content-Disposition: inline In-Reply-To: <87skyvse7k.fsf@xmission.com> User-Agent: Mutt/1.5.13 (2006-08-11) 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:38917 gmane.emacs.devel:92891 Archived-At: 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). 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. Viewing history --------------- The complete history: $ time git log >/dev/null real 0m5.741s $ time bzr log >/dev/null real 3m15.708s Last 100 revisions: $ time git log -100 >/dev/null real 0m0.011s $ time bzr log -l100 >/dev/null real 2m10.270s Last 10 revisions: $ time git log -10 >/dev/null real 0m0.007s $ time bzr log -l10 >/dev/null real 2m9.163s 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 Differences between revisions ----------------------------- I'm using exactly the same revisions in both repositories: revid:cvs-1:wohler-20080318101724-c3ofm3vslli3wfwl = -r -5 revid:cvs-1:dann-20080318035819-bwawewmyps2rb2ot = -r -11 2635714f3dac5f24eb1997cbf97285810f6799c0 = HEAD~4 c4d57908d6d8c693e779599182b810565b2eb608 = HEAD~10 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 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 $ time git diff HEAD~4.. >/dev/null real 0m0.072s $ time bzr diff -r -5.. >/dev/null real 1m21.836s 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 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 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 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