diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-14 10:00:14 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-14 10:01:20 +0100 |
commit | bcffe31d3abab7803b46d6d9be85fb2494a4a25f (patch) | |
tree | cd43d53f3086a78018a7c978a2ad36b5e36d3c7d /Libraries/LibCore | |
parent | 77cb5594b0d98f809ded7242d40b4f2e48b47a1e (diff) | |
download | serenity-bcffe31d3abab7803b46d6d9be85fb2494a4a25f.zip |
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.
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r-- | Libraries/LibCore/CHttpJob.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |