about summary refs log tree commit homepage
path: root/lib/rainbows/client.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-04-30 06:56:47 +0000
committerEric Wong <normalperson@yhbt.net>2011-04-30 06:56:47 +0000
commit8c086f095a2f3be0f71829af9037d99c79604a37 (patch)
treeb0f25996b5b303152dc5654d70f5aa8ea0279d20 /lib/rainbows/client.rb
parentbfb58da95e13f3061feb2c1f284efc80a13ba23c (diff)
downloadrainbows-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/rainbows/client.rb')
-rw-r--r--lib/rainbows/client.rb2
1 files changed, 1 insertions, 1 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