git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: absurdly slow git-diff

From
Pierre Habouzit <madcoder@debian.org>
Date
Nov 8, 2008, 00:14 UTC
Message-ID
<20081108001426.GA19357@artemis.corp>
In-Reply-To
<alpine.LFD.2.00.0811071335010.3468@nehalem.linux-foundation.org>
On Fri, Nov 07, 2008 at 09:37:29PM +0000, Linus Torvalds wrote:
Show 5 quoted lines
> 
> On Sat, 8 Nov 2008, Abhijit Menon-Sen wrote:
> >
> > If anyone's interested, the files are http://toroid.org/misc/1 and
> > http://toroid.org/misc/2
> I'm also adding Pierre, since he was talking about trying to implement
> another diff algorithm (although I'm not at all sure that the patience 
> diff really would help this case at all).

FWIW Patience diff wouldn't help at all here. Patience diff is just a matter of preseeding your preferred diff algorithm with better (wrt human readability) candidate for the invariant lines. IOW it helps dividing the problem into smaller bits, but requires *unique lines* to start with. If you haven't any, then basically, Patience diff does nothing and calls your usual diff algorithm on the whole files.

It does so in a pseudo linear complexity, hence should not make overall time really worse, but will not help for the ending time usually either.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Davide Libenzi
Message 13 of 13 in “absurdly slow git-diff”
  1. Abhijit Menon-SenNov 7, 2008
  2. Mike HommeyNov 7, 2008
  3. Linus TorvaldsNov 7, 2008
  4. Davide LibenziNov 7, 2008
  5. Davide LibenziNov 7, 2008
  6. Linus TorvaldsNov 7, 2008
  7. Davide LibenziNov 7, 2008
  8. Linus TorvaldsNov 7, 2008
  9. Abhijit Menon-SenNov 8, 2008
  10. Junio C HamanoNov 8, 2008
  11. Junio C HamanoNov 8, 2008
  12. Davide LibenziNov 8, 2008
  13. Pierre HabouzitNov 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.