Git development
 help / color / mirror / Atom feed
* blame now knows -S
@ 2006-04-07  9:28 Junio C Hamano
  2006-04-07  9:32 ` Junio C Hamano
  2006-04-08 11:42 ` Fredrik Kuivinen
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-04-07  9:28 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: git, Fredrik Kuivinen

I've made a few changes to "git blame" myself:

 - fix breakage caused by recent revision walker reorganization;
 - use built-in xdiff instead of spawning GNU diff;
 - implement -S <ancestry-file> like annotate does.

Depending on the density of changes, it now appears that blame
is 10%-30% faster than annotate.  I thought CVS emulator might
be interested to give it a whirl..

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blame now knows -S
  2006-04-07  9:28 blame now knows -S Junio C Hamano
@ 2006-04-07  9:32 ` Junio C Hamano
  2006-04-08 11:42 ` Fredrik Kuivinen
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-04-07  9:32 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: git, Fredrik Kuivinen

Junio C Hamano <junkio@cox.net> writes:

> I've made a few changes to "git blame" myself:
>
>  - fix breakage caused by recent revision walker reorganization;
>  - use built-in xdiff instead of spawning GNU diff;
>  - implement -S <ancestry-file> like annotate does.
>
> Depending on the density of changes, it now appears that blame
> is 10%-30% faster than annotate.  I thought CVS emulator might
> be interested to give it a whirl..

Sorry, forgot to mention... The updated blame will be in "next",
not in "master" yet.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blame now knows -S
  2006-04-07  9:28 blame now knows -S Junio C Hamano
  2006-04-07  9:32 ` Junio C Hamano
@ 2006-04-08 11:42 ` Fredrik Kuivinen
  2006-04-08 13:53   ` Marco Costalba
  2006-04-08 20:39   ` Junio C Hamano
  1 sibling, 2 replies; 5+ messages in thread
From: Fredrik Kuivinen @ 2006-04-08 11:42 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Martin Langhoff, git, Fredrik Kuivinen

On Fri, Apr 07, 2006 at 02:28:40AM -0700, Junio C Hamano wrote:
> I've made a few changes to "git blame" myself:
> 
>  - fix breakage caused by recent revision walker reorganization;
>  - use built-in xdiff instead of spawning GNU diff;
>  - implement -S <ancestry-file> like annotate does.
> 
> Depending on the density of changes, it now appears that blame
> is 10%-30% faster than annotate.  I thought CVS emulator might
> be interested to give it a whirl..
> 

Nice work!

There is another possible optimisation with respect to xdiff. Instead
of producing the diff on the xdiff side and parsing the diff in
blame.c, we could add another call back which just gets the relevant
information from the hunk header. I don't know how much we would gain
from this, but it might be worth a try.

- Fredrik

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blame now knows -S
  2006-04-08 11:42 ` Fredrik Kuivinen
@ 2006-04-08 13:53   ` Marco Costalba
  2006-04-08 20:39   ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Marco Costalba @ 2006-04-08 13:53 UTC (permalink / raw)
  To: Fredrik Kuivinen; +Cc: Junio C Hamano, Martin Langhoff, git

On 4/8/06, Fredrik Kuivinen <freku045@student.liu.se> wrote:
> On Fri, Apr 07, 2006 at 02:28:40AM -0700, Junio C Hamano wrote:
> > I've made a few changes to "git blame" myself:
> >
> >  - fix breakage caused by recent revision walker reorganization;
> >  - use built-in xdiff instead of spawning GNU diff;
> >  - implement -S <ancestry-file> like annotate does.
> >
> > Depending on the density of changes, it now appears that blame
> > is 10%-30% faster than annotate.  I thought CVS emulator might
> > be interested to give it a whirl..
> >
>
> Nice work!
>
> There is another possible optimisation with respect to xdiff. Instead
> of producing the diff on the xdiff side and parsing the diff in
> blame.c, we could add another call back which just gets the relevant
> information from the hunk header. I don't know how much we would gain
> from this, but it might be worth a try.
>

If I can comment on this thread, I would like to note IMHO that given
the differences in
languages (C vs Perl) and the use of almost the same algorithm, just a
10%-30% in speed difference between blame and annotate it means that
any further optimization can gain little because the bottleneck is
elsewhere.

And I think is in getting the revision's history. Call it
git-rev-list, although both
blame and annotate use directly the library revision.h

After the new xdiff merge, git-rev-list accounts for almost whole the time.
Normally more then 80% in qgit.

Although the qgit annotation algorithm is different from both blame
and annotate I think
that a faster git-rev-list <path> or revison history walker as you may
want to call it it's a key
in really speed-up annotation stuff.

    Marco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blame now knows -S
  2006-04-08 11:42 ` Fredrik Kuivinen
  2006-04-08 13:53   ` Marco Costalba
@ 2006-04-08 20:39   ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-04-08 20:39 UTC (permalink / raw)
  To: Fredrik Kuivinen; +Cc: Martin Langhoff, git

Fredrik Kuivinen <freku045@student.liu.se> writes:

> There is another possible optimisation with respect to xdiff. Instead
> of producing the diff on the xdiff side and parsing the diff in
> blame.c, we could add another call back which just gets the relevant
> information from the hunk header. I don't know how much we would gain
> from this, but it might be worth a try.

I've tried and then it turned out it did not make much of a
difference.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-08 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-07  9:28 blame now knows -S Junio C Hamano
2006-04-07  9:32 ` Junio C Hamano
2006-04-08 11:42 ` Fredrik Kuivinen
2006-04-08 13:53   ` Marco Costalba
2006-04-08 20:39   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox