From: Jeff Hostetler <git@jeffhostetler.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, gitster@pobox.com,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH] read-cache: call verify_hdr() in a background thread
Date: Fri, 24 Mar 2017 11:46:14 -0400 [thread overview]
Message-ID: <1743d048-8d6b-c14e-161b-351e6d79fb95@jeffhostetler.com> (raw)
In-Reply-To: <20170324153617.smmzju5mygqt5vux@sigill.intra.peff.net>
On 3/24/2017 11:36 AM, Jeff King wrote:
> On Fri, Mar 24, 2017 at 01:27:51PM +0000, git@jeffhostetler.com wrote:
>
>> From: Jeff Hostetler <jeffhost@microsoft.com>
>>
>> Teash do_read_index() in read-cache.c to call verify_hdr()
>> in a background thread while the forground thread parses
>> the index and builds the_index.
>>
>> This is a performance optimization to reduce the overall
>> time required to get the index into memory.
>>
>> Testing on Windows (using the OpenSSL SHA1 routine) showed
>> that parsing the index and computing the SHA1 take almost
>> equal time, so this patch effectively reduces the startup
>> time by 1/2.
>
> Have you considered just skipping the sha1 check on read (possibly with
> an option)?
>
> Its purpose is to detect disk bit-rot. Checking it for every single
> operation may be a bit excessive, especially because it gets rewritten a
> lot. Nobody really cared until now because they don't have index files
> that are hundreds of megabytes.
Yes, we have done that in a version of the client customized
for the virtual file system effort and have been using it
internally without incident for quite a while.
And we can get a patch for that instead (or include it with
this one) if there's interest.
I tried to limit my proposal here to increasing performance while
preserving the existing behavior.
Jeff
next prev parent reply other threads:[~2017-03-24 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 13:27 [PATCH] read-cache: call verify_hdr() in a background thread git
2017-03-24 13:27 ` git
2017-03-24 15:36 ` Jeff King
2017-03-24 15:46 ` Jeff Hostetler [this message]
2017-03-24 16:35 ` Jonathan Nieder
2017-03-24 17:33 ` Jeff Hostetler
2017-03-24 17:53 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1743d048-8d6b-c14e-161b-351e6d79fb95@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).