From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Progress report on git-blame Date: Thu, 20 Feb 2014 19:33:57 +0100 Organization: Organization?!? Message-ID: <87lhx5r5uy.fsf@fencepost.gnu.org> References: <20140109140226.57D6C38085A@snark.thyrsus.com> <20140110155121.GA8178@thyrsus.com> <20140111205925.GC17111@thyrsus.com> <87y52mdoha.fsf@fencepost.gnu.org> <87fvoceuos.fsf_-_@fencepost.gnu.org> <83d2jgcy5z.fsf@gnu.org> <87vbx8cu8a.fsf@fencepost.gnu.org> <52E38211.7030008@gmx.at> <87iot8csyi.fsf@fencepost.gnu.org> <87eh3wcquv.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392921266 31997 80.91.229.3 (20 Feb 2014 18:34:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 18:34:26 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 20 19:34:33 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGYS8-0006bM-QQ for ged-emacs-devel@m.gmane.org; Thu, 20 Feb 2014 19:34:33 +0100 Original-Received: from localhost ([::1]:40166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGYS8-00063H-Ae for ged-emacs-devel@m.gmane.org; Thu, 20 Feb 2014 13:34:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGYS1-00062L-CS for emacs-devel@gnu.org; Thu, 20 Feb 2014 13:34:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGYRs-0006GL-La for emacs-devel@gnu.org; Thu, 20 Feb 2014 13:34:25 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:49394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGYRs-0006Fn-Ed for emacs-devel@gnu.org; Thu, 20 Feb 2014 13:34:16 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WGYRl-00062K-Ad for emacs-devel@gnu.org; Thu, 20 Feb 2014 19:34:09 +0100 Original-Received: from x2f47c6d.dyn.telefonica.de ([2.244.124.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Feb 2014 19:34:09 +0100 Original-Received: from dak by x2f47c6d.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Feb 2014 19:34:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 68 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f47c6d.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:4NGIXh3bNWTLtl7N56pLgUuQndI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169788 Archived-At: David Kastrup writes: > David Kastrup writes: > >> martin rudalics writes: >> >>>> Well, I finally did "git gc --aggressive" on my Emacs repository and >>>> tried again git-blame src/xdisp.c and the times got considerably _worse_ >>>> than before the packing (though the repository went to about a quarter >>>> in size). So after my fixes the run time in real use cases is probably >>>> dominated by unpacking the various revisions, particularly with a >>>> well-compressed repository. >>> >>> Seems like the second law of thermodynamics still applies ... >> >> Yes, life is still easiest on the peanut galleries. > > At any rate, I forgot to set the comparison function on the governing > priority queue, turning it into a FIFO. So the actual numbers on the > packed repository are not as disappointing as I first thought. > > Here are the numbers, first the system version, then my own version: > > dak@lola:/usr/local/tmp/emacs$ time git blame HEAD src/xdisp.c >/tmp/blame1 > > real 3m17.437s > user 2m23.676s > sys 0m52.560s > dak@lola:/usr/local/tmp/emacs$ time ../git/git blame HEAD src/xdisp.c >/tmp/blame2 > > real 1m24.628s > user 0m32.008s > sys 0m52.044s > dak@lola:/usr/local/tmp/emacs$ cmp /tmp/blame1 /tmp/blame2 Aaaand one can shave off about 50 seconds from either by doing git config --add core.deltaBaseCacheLimit 128m (assuming that one has more than about 512mb of main memory, of course). Which gets us to dak@lola:/usr/local/tmp/emacs$ time git blame src/xdisp.c >/dev/null real 2m26.690s user 2m12.148s sys 0m13.772s for the current Git code, and dak@lola:/usr/local/tmp/emacs$ time ../git/git blame src/xdisp.c >/dev/null real 0m27.519s user 0m20.248s sys 0m7.156s for my version of git blame. So once one has bumped core.deltaBaseCacheLimit to a value where Git is not constantly stepping on its own feet with a heavily packed repository, the changed blame program will buy a further factor of 5. At any rate, there is no point in _not_ saving the 50 seconds for bumping the deltaBaseCacheLimit right now. Certainly _iff_ you did git gc --aggressive and thus got a ridiculously expensive to unpack repository. -- David Kastrup