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

Re: [PATCH v2 0/2] read-cache: call verify_hdr() in a background thread

From
Jeff King <peff@peff.net>
Date
Mar 27, 2017, 22:45 UTC
Message-ID
<20170327224505.ngp2gel3yvqcjrhw@sigill.intra.peff.net>
In-Reply-To
<1490648979-49580-1-git-send-email-git@jeffhostetler.com>
On Mon, Mar 27, 2017 at 09:09:37PM +0000, git@jeffhostetler.com wrote:
Show 25 quoted lines
> From: Jeff Hostetler <jeffhost@microsoft.com>
> 
> Version 2 of this patch series simplifies this to just
> turn off the hash verification.  Independent comments
> from Linus and Peff suggested that we could just turn
> this off and not worry about it.  So I've updated this
> patch to do that.  I added a global variable to allow
> the original code path to be used.  I also added a
> t/helper command to demonstrate the differences.
> 
> On the Linux repo, the effect is rather trivial:
> 
>     $ ~/work/gfw/t/helper/test-skip-verify-index -c 3
>     0.029884 0 [cache_nr 57994]
>     0.031035 0 [cache_nr 57994]
>     0.024308 0 [cache_nr 57994]
>     0.028409 0 avg
>     0.018359 1 [cache_nr 57994]
>     0.017025 1 [cache_nr 57994]
>     0.011087 1 [cache_nr 57994]
>     0.015490 1 avg
> 
> On my Windows source tree (450MB index), I'm seeing a
> savings of 0.6 seconds -- read_index() went from 1.2 to 0.6
> seconds.

Very satisfying. I assume that was with OpenSSL as the SHA-1 implementation (sha1dc would have been much slower on 450MB, I think).

-Peff
Previous: git@jeffhostetler.comNext: Jeff Hostetler
Message 9 of 10 in “read-cache: call verify_hdr() in a background thread”
  1. 0/2 read-cache: call verify_hdr() in a background threadgit@jeffhostetler.com, Mar 27, 2017
  2. 1/2 read-cache: skip index SHA verificationgit@jeffhostetler.com, Mar 27, 2017
  3. Jeff KingMar 27, 2017
  4. Jonathan NiederMar 27, 2017
  5. Jeff KingMar 27, 2017
  6. Jeff HostetlerMar 28, 2017
  7. Jeff KingMar 28, 2017
  8. 2/2 skip_verify_index: helper testgit@jeffhostetler.com, Mar 27, 2017
  9. Jeff KingMar 27, 2017
  10. Jeff HostetlerMar 28, 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.