From 13357095eef1bf644ae3f878143716f73e2afd2a Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 19 Oct 2020 14:41:29 +0200 Subject: Increase the default HTTPClient download chunk size to 64 KiB This improves download speeds at the cost of increased memory usage. This change also effects HTTPRequest automatically. See #32807 and #33862. --- core/io/http_client.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/io/http_client.h b/core/io/http_client.h index 1dc1f3d76a..a233d2d038 100644 --- a/core/io/http_client.h +++ b/core/io/http_client.h @@ -182,7 +182,8 @@ private: int response_num = 0; Vector response_headers; - int read_chunk_size = 4096; + // 64 KiB by default (favors fast download speeds at the cost of memory usage). + int read_chunk_size = 65536; Error _get_http_data(uint8_t *p_buffer, int p_bytes, int &r_received); -- cgit v1.2.3