From 2825f46d950ca9b0e269ed8dc6a97c5238a17c30 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 18 Aug 2018 16:17:05 +0200 Subject: CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer size This is step 3 of #2888. Fixes #2888 Closes #2896 --- lib/url.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/url.h') diff --git a/lib/url.h b/lib/url.h index a914f56e6..618309d38 100644 --- a/lib/url.h +++ b/lib/url.h @@ -27,6 +27,18 @@ #define READBUFFER_MAX CURL_MAX_READ_SIZE #define READBUFFER_MIN 1024 +/* The default 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. + + 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 UPLOADBUFFER_DEFAULT 65536 +#define UPLOADBUFFER_MAX (2*1024*1024) +#define UPLOADBUFFER_MIN CURL_MAX_WRITE_SIZE + /* * Prototypes for library-wide functions provided by url.c */ -- cgit v1.2.3