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

Re: Bottlenecks in git merge

From
Petr Baudis <pasky@suse.cz>
Date
Feb 1, 2006, 00:50 UTC
Message-ID
<20060201005035.GD31278@pasky.or.cz>
In-Reply-To
<Pine.LNX.4.64.0601311533040.7301@g5.osdl.org>

Dear diary, on Wed, Feb 01, 2006 at 12:45:27AM CET, I got a letter where Linus Torvalds <torvalds@osdl.org> said that...

> It would be interesting to see how big the "resolve 850 files" part is vs 
> the "check out 10k+ files" is.
See my other mail.
Show 5 quoted lines
> In particular, if the "resolve 850 files" is a noticeable portion of it, 
> then the right thing to do may be to just re-write git-merge-one-file.sh 
> in C. Right now, almost _all_ of the expense of that thing is just the 
> shell interpreter startup. The actual actions it does are usually fairly 
> cheap.
Nope.

xpasky@machine[0:0]~/linux-2.6.git$ echo -e '#!/bin/sh\n/bin/true' >r && chmod a+x r xpasky@machine[0:0]~/linux-2.6.git$ time git-merge-index -o ./r -a

real 0m3.827s user 0m1.788s sys 0m2.004s xpasky@machine[0:0]~/linux-2.6.git$ time git-merge-index -o ~/git-pb/git-merge-one-file -a [lots of "Removing"]

real 1m21.773s user 0m30.806s sys 0m13.248s

The costs are apparently in git-update-index, not in the shell.
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams
Previous: Linus TorvaldsNext: Linus Torvalds
Message 6 of 11 in “Bottlenecks in git merge”
  1. Peter EriksenJan 31, 2006
  2. Junio C HamanoJan 31, 2006
  3. Petr BaudisJan 31, 2006
  4. Junio C HamanoFeb 1, 2006
  5. Linus TorvaldsJan 31, 2006
  6. Petr BaudisFeb 1, 2006
  7. Linus TorvaldsFeb 1, 2006
  8. Petr BaudisJan 31, 2006
  9. read-tree --aggressiveJunio C Hamano, Feb 4, 2006
  10. Peter EriksenFeb 4, 2006
  11. Junio C HamanoFeb 4, 2006

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.