[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 103/153: upload: change default UPLOAD_BUFSIZE to 6
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 103/153: upload: change default UPLOAD_BUFSIZE to 64KB |
Date: |
Tue, 11 Sep 2018 12:52:54 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 8c80a9d1e26be192d30a075e2c7397f8f12498c6
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Aug 17 11:36:12 2018 +0200
upload: change default UPLOAD_BUFSIZE to 64KB
To make uploads significantly faster in some circumstances.
Part 2 of #2888
Closes #2892
---
lib/transfer.c | 2 +-
lib/urldata.h | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/transfer.c b/lib/transfer.c
index 96d8ab48f..ab9094adc 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -992,7 +992,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data,
(data->set.crlf))) {
/* Do we need to allocate a scratch buffer? */
if(!data->state.scratch) {
- data->state.scratch = malloc(2 * data->set.buffer_size);
+ data->state.scratch = malloc(2 * UPLOAD_BUFSIZE);
if(!data->state.scratch) {
failf(data, "Failed to alloc scratch buffer!");
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
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 128/153: docs: clarify NO_PROXY env variable functionality, (continued)
- [GNUnet-SVN] [gnurl] 128/153: docs: clarify NO_PROXY env variable functionality, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 99/153: test1268: check the stderr output as "text", gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 106/153: SSLCERTS: improve the openssl command line, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 108/153: INTERNALS: require GnuTLS >= 2.11.3, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 89/153: travis: disable h2 torture tests for "coverage", gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 93/153: CMake: CMake config files are defining CURL_STATICLIB for static builds, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 97/153: curl: warn the user if a given file name looks like an option, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 102/153: upload: allocate upload buffer on-demand, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 105/153: docs/SECURITY-PROCESS: now we name the files after the CVE id, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 104/153: RELEASE-NOTES: synced, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 103/153: upload: change default UPLOAD_BUFSIZE to 64KB,
gnunet <=
- [GNUnet-SVN] [gnurl] 96/153: http2: check nghttp2_session_set_stream_user_data return code, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 71/153: test1531: Add timeout, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 51/153: smb: don't mark it done in smb_do, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 91/153: ssh-libssh: fix infinite connect loop on invalid private key, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 101/153: vtls: reinstantiate engine on duplicated handles, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 95/153: travis: revert back to gcc-7 for coverage builds, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 86/153: docs: add disallow-username-in-url.d and haproxy-protocol.d on the list, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 98/153: urldata: remove unused pipe_broke struct field, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 92/153: TODO: host name sections in config files, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 110/153: Remove unused definitions, gnunet, 2018/09/11