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

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

From
Duy Nguyen <pclouds@gmail.com>
Date
Apr 3, 2019, 12:06 UTC
Message-ID
<CACsJy8BCGHqjO5fKG7TO5X239z_7Gzdo80jF0rx939X501yVnA@mail.gmail.com>
In-Reply-To
<20190403113604.GA2941@sigill.intra.peff.net>
On Wed, Apr 3, 2019 at 6:36 PM Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> I suspect we could do even better by storing and reusing not just the
> original blob between diffs, but the intermediate diff state (i.e., the
> hashes produced by xdl_prepare(), which should be usable between
> multiple diffs). That's quite a bit more complex, though, and I imagine
> would require some surgery to xdiff.

Amazing. xdl_prepare_ctx and xdl_hash_record (called inside xdl_prepare_ctx) account for 36% according to 'perf report'. Please tell me you just did not get this on your first guess.

I tracked and dumped all the hashes that are sent to xdl_prepare() and it looks like the amount of duplicates is quite high. There are only about 1000 one-time hashes out of 7000 (didn't really draw a histogram to examine closer). So yeah this looks really promising, assuming somebody is going to do something about it.

-- 
Duy
Previous: Jeff KingNext: Jeff King
Message 5 of 8 in “blame.c: don't drop origin blobs as eagerly”
  1. blame.c: don't drop origin blobs as eagerlyDavid Kastrup, Apr 2, 2019
  2. Junio C HamanoApr 3, 2019
  3. Duy NguyenApr 3, 2019
  4. Jeff KingApr 3, 2019
  5. Duy NguyenApr 3, 2019
  6. Jeff KingApr 3, 2019
  7. David KastrupApr 3, 2019
  8. David KastrupApr 3, 2019

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.