From bcffe31d3abab7803b46d6d9be85fb2494a4a25f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 14 Dec 2019 10:00:14 +0100 Subject: [PATCH] LibCore: Bump the CHttpJob receive buffer size from 4KB to 64KB 4KB gets pretty mmap/munmap heavy when downloading larger files, so bump this a bit to reduce time spent in memory allocation. This can be improved in various ways, but I'm not sure what the best way forward is at the moment. --- Libraries/LibCore/CHttpJob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibCore/CHttpJob.cpp b/Libraries/LibCore/CHttpJob.cpp index 8c7f739789..4a65146d9c 100644 --- a/Libraries/LibCore/CHttpJob.cpp +++ b/Libraries/LibCore/CHttpJob.cpp @@ -113,7 +113,7 @@ void CHttpJob::on_socket_connected() } ASSERT(m_state == State::InBody); ASSERT(m_socket->can_read()); - auto payload = m_socket->receive(PAGE_SIZE); + auto payload = m_socket->receive(64 * KB); if (!payload) { if (m_socket->eof()) return finish_up();