diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-01-30 14:23:34 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-30 14:12:14 +0100 |
commit | 322936115e9c85e40310c86e8453160f82d511fb (patch) | |
tree | a9c1210a350299801a6b24b383d386f1e5d56bda /Userland | |
parent | 904e1002b86c82647af99fa4b0eb587ccd219173 (diff) | |
download | serenity-322936115e9c85e40310c86e8453160f82d511fb.zip |
LibProtocol: Bump download stream buffer to PAGE_SIZE
I think this should scale based on the network speed (or download
rate?), but for the time being, 4K seems to be good-enough.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibProtocol/Download.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibProtocol/Download.cpp b/Userland/Libraries/LibProtocol/Download.cpp index 74d8b20840..130a237174 100644 --- a/Userland/Libraries/LibProtocol/Download.cpp +++ b/Userland/Libraries/LibProtocol/Download.cpp @@ -57,7 +57,7 @@ void Download::stream_into(OutputStream& stream) }; notifier->on_ready_to_read = [this, &stream, user_on_finish = move(user_on_finish)] { - constexpr size_t buffer_size = 1 * KiB; + constexpr size_t buffer_size = PAGE_SIZE; static char buf[buffer_size]; auto nread = m_internal_stream_data->read_stream.read({ buf, buffer_size }); if (!stream.write_or_error({ buf, nread })) { |