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

Re: absurdly slow git-diff

From
AMAbhijit Menon-Sen <ams@toroid.org>
Date
Nov 8, 2008, 04:57 UTC
Message-ID
<20081108045742.GA26716@toroid.org>
In-Reply-To
<alpine.LFD.2.00.0811071554590.3468@nehalem.linux-foundation.org>
At 2008-11-07 15:57:23 -0800, torvalds@linux-foundation.org wrote:
Show 5 quoted lines
>
> > Yeah, similar. Mine is below. There's one less branch in the for
> > loops.
> 
> ..and has a comment and made the magic constant be named.
It works fine for me (the time went from 5m17s to 1.8s).

(By the way, my test case is certainly very odd, but it is a real file from my test suite, albeit with the content x'ed away; and the change was to adjust the expected output for all the items. I wasn't looking for bugs. :-)

Thanks for the explanation and the patch.
-- ams
Previous: Linus TorvaldsNext: Junio C Hamano
Message 9 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.