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

Re: git and larger trees, not so fast?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2007, 05:55 UTC
Message-ID
<7vy7gkue5s.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v643ovyli.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
>> (I didn't test it, though, maybe I missed something).
>
> I do not think the change affects the normal codepath.  The
> one-liner patch to git-commit.sh touches the codepath that
> updates the index used only to write out the partial commit, and
> losing the cached stat info from that index does not matter, as
> that index is removed immediately after writing the tree out and
> is never compared with working tree as far as I can tell.

FWIW, moe's script with and without two patches gives these numbers for me.

      with patches                      without patches
----------------------------------------------------------------
# git init                          | # git init			       
Initialized empty Git repository in | Initialized empty Git repository in  
                                    | 				       
real    0m0.029s                    | real    0m0.004s		       
user    0m0.000s                    | user    0m0.000s		       
sys     0m0.008s                    | sys     0m0.004s		       
# git add .                         | # git add .			       
                                    | 				       
real    0m2.947s                    | real    0m3.038s		       
user    0m0.808s                    | user    0m0.876s		       
sys     0m2.120s                    | sys     0m1.996s		       
# git commit -a                     | # git commit -a		       
                                    | 				       
real    0m4.537s                    | real    0m4.674s		       
user    0m1.980s                    | user    0m1.888s		       
sys     0m2.356s                    | sys     0m2.332s		       
# git status (three times)          | # git status (three times)	       
# On branch master                  | # On branch master		       
nothing to commit (working directory| nothing to commit (working directory 
                                    | 				       
real    0m0.718s                    | real    0m17.323s		       
user    0m0.300s                    | user    0m16.913s		       
sys     0m0.416s                    | sys     0m0.396s		       
# On branch master                  | # On branch master		       
nothing to commit (working directory| nothing to commit (working directory 
                                    | 				       
real    0m0.707s                    | real    0m16.994s		       
user    0m0.312s                    | user    0m16.573s		       
sys     0m0.400s                    | sys     0m0.416s		       
# On branch master                  | # On branch master		       
nothing to commit (working directory| nothing to commit (working directory 
                                    | 				       
real    0m0.720s                    | real    0m18.042s		       
user    0m0.344s                    | user    0m17.633s		       
sys     0m0.376s                    | sys     0m0.408s		       
# git commit (one path)             | # git commit (one path)	       
Created commit 3483df5: expose the t| Created commit ced664f: expose the t 
 1 files changed, 1 insertions(+), 1|  1 files changed, 1 insertions(+), 1 
                                    | 				       
real    0m3.057s                    | real    0m38.130s		       
user    0m0.888s                    | user    0m37.458s		       
sys     0m0.712s                    | sys     0m0.616s                     
----------------------------------------------------------------
Previous: Junio C HamanoNext: Linus Torvalds
Message 19 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.