-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read-cache: run verify_hdr() in background thread #978
read-cache: run verify_hdr() in background thread #978
Conversation
This is a performance optimization. Teach do_read_index() to call verify_hdr() using a thread and allow SHA1 verification to run concurrently with the parsing of index-entries and extensions. For large index files, this cuts the startup time in half. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Very nice! I think I will refactor this a little bit when sending it upstream, so that we end up with a single |
Reading a large index [has been speeded up using pthreads](git-for-windows/git#978). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
That's fine. I was mainly concentrating on the timings for (very) large repos. I also expect a discussion on the threshold value for enabling it. On a 16Mb index file, it saved about 0.03 seconds. On a 450Mb index file it saved 0.7 seconds -- which gives us 10-20% on short-running commands. |
And thanks for the quick review! |
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…er/thread_verify_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
…y_hdr read-cache: run verify_hdr() in background thread
This is a performance optimization.
Teach do_read_index() to call verify_hdr() using a thread
and allow SHA1 verification to run concurrently with the
parsing of index-entries and extensions.
For large index files, this cuts the startup time in half.
Signed-off-by: Jeff Hostetler jeffhost@microsoft.com