From: David Turner <dturner@twopensource.com>
To: git@vger.kernel.org
Cc: David Turner <dturner@twopensource.com>
Subject: [PATCH] read-cache: increase write buffer size
Date: Fri, 18 Mar 2016 21:19:01 -0400 [thread overview]
Message-ID: <1458350341-12276-1-git-send-email-dturner@twopensource.com> (raw)
Each write() has syscall overhead, and writing a large index entails
many such calls. A larger write buffer reduces the overhead,
leading to increased performance.
On my repo, which has an index size of 30m, this saves about 10ms of
time writing the index.
Signed-off-by: David Turner <dturner@twopensource.com>
---
read-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/read-cache.c b/read-cache.c
index d9fb78b..09ebe08 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1714,7 +1714,7 @@ int unmerged_index(const struct index_state *istate)
return 0;
}
-#define WRITE_BUFFER_SIZE 8192
+#define WRITE_BUFFER_SIZE 131072
static unsigned char write_buffer[WRITE_BUFFER_SIZE];
static unsigned long write_buffer_len;
--
2.4.2.767.g62658d5-twtrsrc
next reply other threads:[~2016-03-19 1:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 1:19 David Turner [this message]
2016-03-19 8:05 ` [PATCH] read-cache: increase write buffer size Torsten Bögershausen
2016-03-19 10:25 ` Pranit Bauva
2016-03-19 11:18 ` Duy Nguyen
2016-03-21 16:22 ` David Turner
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=1458350341-12276-1-git-send-email-dturner@twopensource.com \
--to=dturner@twopensource.com \
--cc=git@vger.kernel.org \
/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).