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

Re: git and larger trees, not so fast?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Aug 10, 2007, 15:49 UTC
Message-ID
<alpine.LFD.0.999.0708100836340.30176@woody.linux-foundation.org>
In-Reply-To
<7vy7gkue5s.fsf@assigned-by-dhcp.cox.net>
On Thu, 9 Aug 2007, Junio C Hamano wrote:
> 
> FWIW, moe's script with and without two patches gives these
> numbers for me.

Btw, I really think it's worth doing even just the hacky patches at this stage, even though it's late in the game for 1.5.3.

That performance problem is serious enough that I'd call it a major bug. Performance has always been one of the goals of git, and when you have a difference between 17s and 0.7s for "git status", that's a *huge* usability thing. It would be sad to release 1.5.3 with a known bug.

[ Some people don't think performance issues are "real bugs", and I think 
  such people shouldn't be allowed to program. ]

Side note: your first patch is actually quite noticeable on even just the kernel. Not nearly as much, but without it, I get about 0.5s, and with it, I get consistently under 0.3s. So it's about a 40% improvement even for smaller projects (and it's probably much more if you have a CPU with a smaller cache: my Core 2 Duo has 4MB of L2 cache, and a lot of the index will even fit in the L1 - a slower CPU with less cache will see a bigger impact, and with smaller repositories, from the unnecessary memory moving).

While 0.5s -> 0.3s may not sound like much, on a slower machine where it might otherwise be 2.5s -> 1.5s, that's likely to be quite noticeable.

In fact, I can tell even on my machine: 0.3s is visible as a "I'm clearly thinking about it" delay (quite frankly, it would be better at 0.1s, which is "immediate"), but 0.5s is already approaching the point where you actually wait for the answer (rather than just notice that it wasn't quite immediate).

				Linus
Previous: Junio C HamanoNext: Linus Torvalds
Message 20 of 37 in “git and larger trees, not so fast?”
  1. moeAug 9, 2007
  2. Linus TorvaldsAug 9, 2007
  3. Linus TorvaldsAug 9, 2007
  4. Junio C HamanoAug 9, 2007
  5. Linus TorvaldsAug 9, 2007
  6. Junio C HamanoAug 9, 2007
  7. Junio C HamanoAug 9, 2007
  8. SeanAug 9, 2007
  9. Junio C HamanoAug 9, 2007
  10. Linus TorvaldsAug 9, 2007
  11. Linus TorvaldsAug 9, 2007
  12. Junio C HamanoAug 9, 2007
  13. Junio C HamanoAug 9, 2007
  14. Junio C HamanoAug 10, 2007
  15. Linus TorvaldsAug 10, 2007
  16. Junio C HamanoAug 10, 2007
  17. Linus TorvaldsAug 10, 2007
  18. Junio C HamanoAug 10, 2007
  19. Junio C HamanoAug 10, 2007
  20. Linus TorvaldsAug 10, 2007
  21. Linus TorvaldsAug 10, 2007
  22. Fix "git commit directory/" performance anomalyLinus Torvalds, Aug 10, 2007
  23. Linus TorvaldsAug 10, 2007
  24. Junio C HamanoAug 10, 2007
  25. Linus TorvaldsAug 10, 2007
  26. Daniel BarkalowAug 10, 2007
  27. Linus TorvaldsAug 9, 2007
  28. David KastrupAug 9, 2007
  29. Linus TorvaldsAug 10, 2007
  30. Linus TorvaldsAug 11, 2007
  31. Fernando J. PeredaAug 11, 2007
  32. Linus TorvaldsAug 11, 2007
  33. Fernando J. PeredaAug 11, 2007
  34. Linus TorvaldsAug 11, 2007
  35. David KastrupAug 11, 2007
  36. moeAug 11, 2007
  37. moeAug 23, 2007

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.