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.
This commit is contained in:
Andreas Kling 2019-12-14 10:00:14 +01:00
parent 77cb5594b0
commit bcffe31d3a
Notes: sideshowbarker 2024-07-19 10:52:07 +09:00

View file

@ -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();