From: git@jeffhostetler.com
To: git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: [PATCH] read-cache: call verify_hdr() in a background thread
Date: Fri, 24 Mar 2017 13:27:50 +0000 [thread overview]
Message-ID: <1490362071-46932-1-git-send-email-git@jeffhostetler.com> (raw)
From: Jeff Hostetler <jeffhost@microsoft.com>
This patch contains a performance optimization to run
verify_hdr() in a background thread while the foreground
thread parses the index. This allows do_read_index() to
complete faster.
This idea was recently discussed on the mailing list in:
https://public-inbox.org/git/85221b97-759f-b7a9-1256-21515d163cbf@jeffhostetler.com/
during a discussion on sha1dc.
Our testing on Windows showed that verifying the SHA1 hash
on the index file takes approximately the same amount of time
as parsing the file and building the array of cache_entries.
(It could also be that having 2 threads better ammortizes the
page faults of reading from the mmap'd file.)
An earlier version of this change has been in use in GfW since December:
https://github.com/git-for-windows/git/pull/978
Jeff Hostetler (1):
read-cache: call verify_hdr() in a background thread
read-cache.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 86 insertions(+), 1 deletion(-)
--
2.7.4
next reply other threads:[~2017-03-24 13:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 13:27 git [this message]
2017-03-24 13:27 ` [PATCH] read-cache: call verify_hdr() in a background thread git
2017-03-24 15:36 ` Jeff King
2017-03-24 15:46 ` Jeff Hostetler
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=1490362071-46932-1-git-send-email-git@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).