aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-08-17 11:36:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-08-18 15:48:52 +0200
commit8c80a9d1e26be192d30a075e2c7397f8f12498c6 (patch)
treeb309ade8c533d99b2e9e154e45c04d24e22d721b /lib/urldata.h
parente6e9b006f770ef104fbcdef32dd6e7f42eb114b7 (diff)
upload: change default UPLOAD_BUFSIZE to 64KB
To make uploads significantly faster in some circumstances. Part 2 of #2888 Closes #2892
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 502cff362..67db3b2fc 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -143,8 +143,13 @@ typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */
#endif /* HAVE_LIBSSH2_H */
/* The upload buffer size, should not be smaller than CURL_MAX_WRITE_SIZE, as
- it needs to hold a full buffer as could be sent in a write callback */
-#define UPLOAD_BUFSIZE CURL_MAX_WRITE_SIZE
+ it needs to hold a full buffer as could be sent in a write callback.
+
+ The size was 16KB for many years but was bumped to 64KB because it makes
+ libcurl able to do significantly faster uploads in some circumstances. Even
+ larger buffers can help further, but this is deemed a fair memory/speed
+ compromise. */
+#define UPLOAD_BUFSIZE 65536
/* The "master buffer" is for HTTP pipelining */
#define MASTERBUF_SIZE 16384