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

Re: CFT: merge-recursive in C (updated)

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 27, 2006, 18:22 UTC
Message-ID
<Pine.LNX.4.64.0606271116360.3927@g5.osdl.org>
In-Reply-To
<81b0412b0606270848v2253209aw52466de632ab25c1@mail.gmail.com>
On Tue, 27 Jun 2006, Alex Riesen wrote:
Show 5 quoted lines
> 
> Good news is that it is faster: 6min vs 10min. Bad news is that it is still
> not enough for me and it is only on Linux (Windows will be slower,
> still testing),
> uses an awful lot of memory and CPU.

Why do you do that horrible node_list, and the broken "find common ancestors?"

I can't follow your code, but it _looks_ like you are using some totally broken graph walking function.

For git, the #1 optimization ALWAYS is to avoid walking the full commit graph. That fundamentally _cannot_ scale.

Almost all of the "hard work" in git has been to try to read the minimum amount of commits possible. That means that you absolutely must not just walk the commits the "obvious" way, because that will always require you to build up the whole graph of the whole history, even if the common shared point is much closer.

So it look slike your "graph.c" is _fundamentally_ flawed.

You need to really read "git-merge-base.c" and understand it thoroughly. And then you need to throw away your graph.c, and use git-merge-base instead.

			Linus
Previous: Alex RiesenNext: Johannes Schindelin
Message 29 of 32 in “CFT: merge-recursive in C (updated)”
  1. Alex RiesenJun 27, 2006
  2. Johannes SchindelinJun 27, 2006
  3. Alex RiesenJun 27, 2006
  4. Alex RiesenJun 28, 2006
  5. Johannes SchindelinJun 28, 2006
  6. Alex RiesenJun 28, 2006
  7. Johannes SchindelinJun 28, 2006
  8. Alex RiesenJun 28, 2006
  9. Johannes SchindelinJun 28, 2006
  10. Alex RiesenJun 29, 2006
  11. Junio C HamanoJun 29, 2006
  12. Alex RiesenJun 29, 2006
  13. Johannes SchindelinJun 29, 2006
  14. Alex RiesenJun 29, 2006
  15. Johannes SchindelinJun 29, 2006
  16. 1/2 refactor merge_bases() as preparation to libify merge-baseJohannes Schindelin, Jun 29, 2006
  17. move get_merge_bases() to core lib; use it in merge-recursiveJohannes Schindelin, Jun 29, 2006
  18. Johannes SchindelinJun 29, 2006
  19. Alex RiesenJun 29, 2006
  20. Johannes SchindelinJun 29, 2006
  21. Alex RiesenJun 29, 2006
  22. Alex RiesenJun 29, 2006
  23. Johannes SchindelinJun 29, 2006
  24. Linus TorvaldsJun 29, 2006
  25. Junio C HamanoJun 29, 2006
  26. Johannes SchindelinJun 29, 2006
  27. Junio C HamanoJun 29, 2006
  28. Alex RiesenJun 30, 2006
  29. Linus TorvaldsJun 27, 2006
  30. Johannes SchindelinJun 27, 2006
  31. Linus TorvaldsJun 27, 2006
  32. Alex RiesenJun 27, 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.