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

Re: [PATCH] remove over-eager caching in sha1_file_name

From
Junio C Hamano <gitster@pobox.com>
Date
May 26, 2010, 05:07 UTC
Message-ID
<7vtypvqmim.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100522065942.GB11335@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> Actually, thinking on it more, micro-optimizing this is really
> pointless. I was thinking that it would get called a lot, so we need to
> care. But the next step is almost certainly to open, mmap, and zlib
> decompress the resulting object, which is way more expensive.
>
> So here it is with caching ripped out. More readable and more robust,
> and I'm sure we can afford an extra strlen() and memcpy() on each object
> lookup.
Makes sense; thanks.
Previous: Jeff KingNext: Eli Barzilay
Message 5 of 6 in “Checking out on a different+partial directory”
  1. Eli BarzilayMay 17, 2010
  2. Jeff KingMay 22, 2010
  3. fix over-eager caching in sha1_file_nameJeff King, May 22, 2010
  4. remove over-eager caching in sha1_file_nameJeff King, May 22, 2010
  5. Junio C HamanoMay 26, 2010
  6. Eli BarzilayMay 27, 2010

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.