git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] read-cache: call verify_hdr() in a background thread
@ 2017-03-24 13:27 git
  2017-03-24 13:27 ` git
  0 siblings, 1 reply; 7+ messages in thread
From: git @ 2017-03-24 13:27 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, Jeff Hostetler

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-24 17:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-03-24 16:35   ` Jonathan Nieder
2017-03-24 17:33     ` Jeff Hostetler
2017-03-24 17:53       ` Jonathan Nieder

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).