Git development
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Abhijit Menon-Sen <ams@toroid.org>
Cc: git@vger.kernel.org
Subject: Re: absurdly slow git-diff
Date: Fri, 7 Nov 2008 22:28:36 +0100	[thread overview]
Message-ID: <20081107212836.GA22717@glandium.org> (raw)
In-Reply-To: <20081107200126.GA20284@toroid.org>

On Sat, Nov 08, 2008 at 01:31:27AM +0530, Abhijit Menon-Sen wrote:
> I have a 240k-line file, and I change one character on every sixth line.
> The resulting diff gives git serious indigestion:
> 
> $ git --version
> git version 1.6.0.3.640.g6331a
> $ mkdir a; cd a; git init
> Initialized empty Git repository in /home/ams/a/.git/
> $ cp ../1 .; git add 1; git commit -q -m 1
> $ cp ../2 1; git add 1; git commit -q -m 2 

You don't need to go that far. You can stop at cp ../2 1 and run git
diff from there.

All the time is spent in the two loops in
xdiff/xprepare.c:xdl_cleanup_records, on line 400 and 412.

I'll leave the rest of the investigation to people actually knowing this
code ;)

Mike

  reply	other threads:[~2008-11-07 21:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 20:01 absurdly slow git-diff Abhijit Menon-Sen
2008-11-07 21:28 ` Mike Hommey [this message]
2008-11-07 21:37 ` Linus Torvalds
2008-11-07 23:04   ` Davide Libenzi
2008-11-07 23:18     ` Davide Libenzi
2008-11-07 23:42       ` Linus Torvalds
2008-11-07 23:48         ` Davide Libenzi
2008-11-07 23:57           ` Linus Torvalds
2008-11-08  4:57             ` Abhijit Menon-Sen
2008-11-08 21:02             ` Junio C Hamano
2008-11-08  5:30           ` Junio C Hamano
2008-11-08 16:27             ` Davide Libenzi
2008-11-08  0:14   ` Pierre Habouzit

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=20081107212836.GA22717@glandium.org \
    --to=mh@glandium.org \
    --cc=ams@toroid.org \
    --cc=git@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox