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

Re: [PATCH] Rename detection: Avoid repeated filespec population

From
Jeff King <peff@peff.net>
Date
Jan 20, 2009, 22:12 UTC
Message-ID
<20090120221214.GA13668@coredump.intra.peff.net>
In-Reply-To
<20090120212723.GA10967@coredump.intra.peff.net>
On Tue, Jan 20, 2009 at 04:27:23PM -0500, Jeff King wrote:
Show 6 quoted lines
> I have a pathological real-world rename test case from a long time ago.
> It's so awful on rename because almost the whole repo was reorganized,
> but almost every path got its content adjusted, too. I was hoping it
> would be better with your patch, but it isn't: as it turns out, it is
> _too_ uniform. The cheap size checks don't work because all of the files
> are almost the same size (they're all jpgs from a camera).

Nevermind, I'm stupid. Your patch _does_ yield a significant improvement for my test case. I was accidentally comparing your patch to some of my previous optimization attempts, not to vanilla git.

Without your patch, I get:
  $ time git show -l0 06d28867 >/dev/null
  841.88user 146.95system 17:18.99elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
  2476880inputs+0outputs (19372major+27092797minor)pagefaults 0swaps
With it, I get:
  $ time git show -l0 06d28867 >/dev/null
  100.51user 5.76system 2:31.07elapsed 70%CPU (0avgtext+0avgdata 0maxresident)k
  2020176inputs+0outputs (15771major+836127minor)pagefaults 0swaps
So much much better.
-Peff
Previous: Jeff KingNext: Björn Steinbrink
Message 3 of 6 in “Rename detection: Avoid repeated filespec population”
  1. Rename detection: Avoid repeated filespec populationBjörn Steinbrink, Jan 20, 2009
  2. Jeff KingJan 20, 2009
  3. Jeff KingJan 20, 2009
  4. Björn SteinbrinkJan 21, 2009
  5. Jeff KingJan 21, 2009
  6. Junio C HamanoJan 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.