diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-04-30 06:56:47 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-04-30 06:56:47 +0000 |
commit | 8c086f095a2f3be0f71829af9037d99c79604a37 (patch) | |
tree | b0f25996b5b303152dc5654d70f5aa8ea0279d20 /lib | |
parent | bfb58da95e13f3061feb2c1f284efc80a13ba23c (diff) | |
download | rainbows-8c086f095a2f3be0f71829af9037d99c79604a37.tar.gz |
HTTP headers are usually smaller than 4K, so 16K was way too much for most users and often caused unnecessary GC runs. EventMachine and Coolio models can all share the same initial read buffer, so it's less urgent that they get this lowered for now...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rainbows/client.rb | 2 | ||||
-rw-r--r-- | lib/rainbows/process_client.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/client.rb b/lib/rainbows/client.rb index 9b65cea..7387c44 100644 --- a/lib/rainbows/client.rb +++ b/lib/rainbows/client.rb @@ -16,7 +16,7 @@ class Rainbows::Client < Kgio::Socket def timed_read(buf) expire = nil begin - case rv = kgio_tryread(16384, buf) + case rv = kgio_tryread(0x1000, buf) when :wait_readable return if expire && expire < Time.now expire ||= read_expire diff --git a/lib/rainbows/process_client.rb b/lib/rainbows/process_client.rb index 24132f5..6201064 100644 --- a/lib/rainbows/process_client.rb +++ b/lib/rainbows/process_client.rb @@ -10,7 +10,7 @@ module Rainbows::ProcessClient def process_loop @hp = hp = Rainbows::HttpParser.new - kgio_read!(16384, buf = hp.buf) or return + kgio_read!(0x1000, buf = hp.buf) or return begin # loop until env = hp.parse |