all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Progress report on git-blame
Date: Sat, 25 Jan 2014 09:59:33 +0100	[thread overview]
Message-ID: <87vbx8cu8a.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <83d2jgcy5z.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Jan 2014 09:34:32 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: David Kastrup <dak@gnu.org>
>> Date: Sat, 25 Jan 2014 02:06:43 +0100
>> 
>> my current code (which is not ready for submission as it does not
>> support all options of git-blame yet) takes 2 seconds for the git-blame
>> step as opposed to the 40 seconds the system binary does.  That's at
>> least encouraging and one can expect some of that to be pure output
>> time.
>
> Thank you for doing this.

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.  The positive thing about it is that fixing
the blame algorithm will make the remaining culprits stand out more
prominently when profiling.

The downside, of course, is that I had not been banking on having to
rework more than the blame algorithm itself to move C-x v g into the
"tolerable" area.

[system version]
dak@lola:/usr/local/tmp/emacs$ time git blame src/xdisp.c >/dev/null

real	3m5.786s
user	2m21.168s
sys	0m43.956s

[my version]
dak@lola:/usr/local/tmp/emacs$ time ../git/git blame src/xdisp.c >/dev/null

real	2m11.865s
user	1m13.372s
sys	0m57.656s

I am currently using commit time for prioritizing a breadth-first search
exhausting all later commits before going to previous revisions.  That
may result in worse object retainment patterns for the unpacking stage
while walking backwards in history.


Apart from trying to bully up general git performance and from trying to
get the unpacking to cache smarter, it would also be feasible to add a
"fast track" interface to git blame --interactive where Emacs sends
information about "currently viewed material corresponds to lines
xxx...yyy in the file" to the running git process which is used for
prioritizing the outstanding work.  That would be reasonably doable from
the git side, but of course it would require additional support from
vc-git.

I did that kind of thing in preview-latex (an in-document viewing mode
available in AUCTeX) for being able to work with large files and
four-figure amounts of included graphics while rendering all the
graphics with GhostScript on a 200MHz CPU.  It has sort of an
xroach-like effect where everything looks calm and finished until you
try scrolling around in the document.

While that stuff does not help with non-interactive use like M-x occur,
it should be useful even for incremental search as long as the search
concerns the _meat_ of the lines rather than the blame info.

But I definitely don't have the time to work on the Emacs component of
that sort of thing myself.

-- 
David Kastrup



  reply	other threads:[~2014-01-25  8:59 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 14:02 RFC - cleaning up /etc Eric S. Raymond
2014-01-09 14:48 ` Samuel El-Borai
2014-01-09 15:09 ` Samuel El-Borai
2014-01-09 16:57 ` Glenn Morris
2014-01-09 17:42   ` Eric S. Raymond
2014-01-09 19:50     ` Glenn Morris
2014-01-10 14:35 ` Richard Stallman
2014-01-10 15:51   ` Eric S. Raymond
2014-01-11  7:15     ` Richard Stallman
2014-01-11 10:17       ` Eric S. Raymond
2014-01-11 18:37         ` Richard Stallman
2014-01-11 10:53       ` Ulrich Mueller
2014-01-11 20:01       ` Glenn Morris
2014-01-11 20:59         ` Eric S. Raymond
2014-01-11 21:10           ` Eli Zaretskii
2014-01-11 21:27             ` Eric S. Raymond
2014-01-12  0:07           ` Lars Magne Ingebrigtsen
2014-01-12  0:20             ` Eric S. Raymond
2014-01-12  0:37             ` David Kastrup
2014-01-12  3:51               ` Eli Zaretskii
2014-01-25  1:06               ` Progress report on git-blame (was: RFC - cleaning up /etc) David Kastrup
2014-01-25  7:34                 ` Eli Zaretskii
2014-01-25  8:59                   ` David Kastrup [this message]
2014-01-25  9:21                     ` Progress report on git-blame martin rudalics
2014-01-25  9:27                       ` David Kastrup
2014-01-25 10:12                         ` David Kastrup
2014-02-20 18:33                           ` David Kastrup
2014-01-25 18:21                     ` Lars Ingebrigtsen
2014-01-25 18:30                       ` David Kastrup
2014-01-25 18:52                       ` Óscar Fuentes
2014-01-25 18:59                         ` David Kastrup
2014-01-25 19:31                           ` Eli Zaretskii
2014-01-25 19:44                           ` Óscar Fuentes
2014-01-25 20:02                             ` David Kastrup
2014-01-25 21:45                       ` Stefan Monnier
2014-01-26 14:40                         ` Aneesh Kumar K.V
2014-01-27 14:17                           ` Stefan Monnier
2014-01-25 21:48                       ` Stefan Monnier
2014-01-25 23:03                         ` Óscar Fuentes
2014-01-26  1:48                           ` Stefan Monnier
2014-01-26 17:37                             ` Eli Zaretskii
2014-01-26 19:05                               ` Stefan Monnier
2014-01-26 19:40                                 ` Eli Zaretskii
2014-01-26 22:14                                   ` Stefan Monnier
2014-01-26  6:30                         ` David Kastrup
2014-01-26 15:07                           ` Stefan Monnier
2014-01-25  8:28                 ` David Engster
2014-01-25  9:14                   ` David Kastrup
2014-01-12  3:03             ` RFC - cleaning up /etc Stefan Monnier
2014-01-12 13:46         ` Richard Stallman
2014-01-12 19:17           ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbx8cu8a.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.