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

Re: [PATCH v1] diffcore-rename: speed up register_rename_src

From
Jeff King <peff@peff.net>
Date
Apr 20, 2017, 15:50 UTC
Message-ID
<20170420155003.cugkol6rbv25lpdi@sigill.intra.peff.net>
In-Reply-To
<alpine.DEB.2.20.1704201231350.3480@virtualbox>
On Thu, Apr 20, 2017 at 12:40:52PM +0200, Johannes Schindelin wrote:
Show 16 quoted lines
> > > Teach register_rename_src() to see if new file pair can simply be
> > > appended to the rename_src[] array before performing the binary search
> > > to find the proper insertion point.
> > 
> > I guess your perf results show some minor improvement. But I suspect
> > this is because your synthetic repo does not resemble the real world
> > very much.
> 
> Please note that the synthetic test repo was added *after* coming up with
> the patch, *after* performance benchmarking on a certain really big
> repository (it is not hard to guess what use case we are optimizing,
> right?).
> 
> In that light, I would like to register the fact that Jeff's performance
> work is trying to improve a very real world, that of more than 2,000
> developers in our company [*1*].

Sure; I didn't think it came out of thin air. What are the benchmarks on this real-world repository, then?

Specifically, it looks like this optimization isn't really about the number of files in the repository so much as the number of additions/deletions in a particular diff (which is what become rename sources and destinations).

Is it common to add or delete 4 million tiny files and then run "git status"?

Note that I think the optimization probably _is_ worth doing in the general case. These "is it sorted" tradeoffs can backfire if we sometimes get unsorted input, but I don't think that would ever be the case here. My main complaint is not that it's not worth doing, but that I'm not excited about sprinkling these checks ad-hoc throughout the code base.

-Peff
Previous: Johannes Schindelin
Message 13 of 13 in “diffcore-rename speedup”
  1. diffcore-rename speedupgit@jeffhostetler.com, Apr 18, 2017
  2. diffcore-rename: speed up register_rename_srcgit@jeffhostetler.com, Apr 18, 2017
  3. Jeff KingApr 19, 2017
  4. Junio C HamanoApr 19, 2017
  5. Jeff KingApr 19, 2017
  6. Jeff KingApr 19, 2017
  7. Jeff HostetlerApr 20, 2017
  8. Jeff KingApr 20, 2017
  9. Jeff HostetlerApr 20, 2017
  10. Jeff KingApr 20, 2017
  11. Junio C HamanoApr 21, 2017
  12. Johannes SchindelinApr 20, 2017
  13. Jeff KingApr 20, 2017

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.