diff options
author | Eric Wong <bofh@yhbt.net> | 2022-12-22 09:02:10 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2022-12-22 09:02:51 +0000 |
commit | 17969a9a67ae8db7dbc227a8afbb220b94d08e7f (patch) | |
tree | 99ecc30f1144a7182507d4210de9cbe7a2031abd /lib/yahns/http_client.rb | |
parent | e263cc5a5771dfdeb6811f812d8b054e5404621f (diff) | |
download | yahns-17969a9a67ae8db7dbc227a8afbb220b94d08e7f.tar.gz |
This is the size used by Ruby internally for IO.copy_stream. 8192 seems too small nowadays with the higher cost of syscalls.
Diffstat (limited to 'lib/yahns/http_client.rb')
-rw-r--r-- | lib/yahns/http_client.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb index b6b6035..826eb8d 100644 --- a/lib/yahns/http_client.rb +++ b/lib/yahns/http_client.rb @@ -315,7 +315,7 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc: end def do_pread(io, count, offset) - count = 0x4000 if count > 0x4000 + count = 16384 if count > 16384 buf = Thread.current[:yahns_sfbuf] ||= ''.dup if io.respond_to?(:pread) io.pread(count, offset, buf) |