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

Re: three-way diff performance problem

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 21, 2009, 18:16 UTC
Message-ID
<alpine.LFD.2.01.0907211113260.19335@localhost.localdomain>
In-Reply-To
<alpine.LFD.2.01.0907211038120.19335@localhost.localdomain>
On Tue, 21 Jul 2009, Linus Torvalds wrote:
Show 5 quoted lines
> 
> Now, being a git person, what does that say? Right: just check in the 
> working kernels as two branches under the same filename, then merge the 
> branches, and force the merge result to be the non-working kernel, and do 
> a three-way combined context diff! So I did exactly that.

Btw, I did it wrong, which is why it takes too long. Instead of making the result be the right dump-file, I made it be a bad one, so the diffs are much bigger than they should be. Which then makes the combined-merge diff take longer than necessary (with the O(n^2) thing).

Doing it _correctly_ actually made the three-way diff only take 45 seconds, but sadly still left me with 22 thousand lines.

			Linus
Previous: Linus TorvaldsNext: Junio C Hamano
Message 2 of 8 in “three-way diff performance problem”
  1. Linus TorvaldsJul 21, 2009
  2. Linus TorvaldsJul 21, 2009
  3. Junio C HamanoJul 21, 2009
  4. Linus TorvaldsJul 21, 2009
  5. Junio C HamanoJul 21, 2009
  6. Linus TorvaldsJul 21, 2009
  7. Junio C HamanoJul 21, 2009
  8. Linus TorvaldsJul 21, 2009

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.