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: Sat, 25 Jan 2014 11:12:24 +0100 Organization: Organization?!? Message-ID: <87eh3wcquv.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390644764 27956 80.91.229.3 (25 Jan 2014 10:12:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 10:12:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 25 11:12:50 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 1W70EM-0006B5-J9 for ged-emacs-devel@m.gmane.org; Sat, 25 Jan 2014 11:12:50 +0100 Original-Received: from localhost ([::1]:50559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W70EM-0006gk-4U for ged-emacs-devel@m.gmane.org; Sat, 25 Jan 2014 05:12:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W70EF-0006gZ-I2 for emacs-devel@gnu.org; Sat, 25 Jan 2014 05:12:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W70EA-0000Rr-DA for emacs-devel@gnu.org; Sat, 25 Jan 2014 05:12:43 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:41345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W70EA-0000Rl-7w for emacs-devel@gnu.org; Sat, 25 Jan 2014 05:12:38 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W70E8-00065Y-Cx for emacs-devel@gnu.org; Sat, 25 Jan 2014 11:12:36 +0100 Original-Received: from x2f416b0.dyn.telefonica.de ([2.244.22.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jan 2014 11:12:36 +0100 Original-Received: from dak by x2f416b0.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jan 2014 11:12:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 60 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f416b0.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:aJ1azaKfzLAQxgrR5/uDm6kpTEc= 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:169053 Archived-At: 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 dak@lola:/usr/local/tmp/emacs$ But it's obvious that significant further improvements will depend on either or both a) making git-blame respond to interactively determined requirements (basically, reacting to expose events) b) significantly decreasing the involved system time by employing a good caching strategy c) not letting the basic algorithm and the cached data progress independently but try catering the workload order on what happens to be in-memory at a given point of time. c) is a very shady approach and would make debugging a nightmare. At any rate, the user time already dropped by more than a factor of 4, and I have not touched the inner work horse (the diff algorithm) at all, just eliminated all the thrashing around it. Now the diff algorithm itself is a separate library by a separate author, with widespread use. It would be rather optimistic to assume that there are significantly low-hanging fruit to be found there. Shrug. I'll go see how I can reimplement the now defunct copy/move detection not exercised without specific command line options in order to get the current work into a shape where upstream can consider accepting it. -- David Kastrup