about summary refs log tree commit homepage
path: root/lib/rainbows/client.rb
DateCommit message (Collapse)
2011-06-28Fix Fiber* and WriterThread* breakage from removing io/wait
This fixes up breakage introduced in commit 905f0ff393629ddb4d70e3dc221b016128c47415 to switch to kgio for timed, synchronous waiting.
2011-06-28require kgio 2.5 for kgio_wait_readable(timeout)
Since kgio_wait_*able in kgio 2.5 takes an optional timeout argument, we no longer have to load the extra "io/wait" module. This saves us a small amount of some memory and also removes the extra ioctl(FIONREAD) syscall IO#wait enforces. Like IO#wait in Ruby 1.9.3dev, kgio_wait_readable may use ppoll() to wait on high-numbered file descriptors as efficiently as it waits on low-numbered descriptors.
2011-05-20client: use kgio_write across the board
This should enable Kgio "autopush" support for ThreadSpawn, ThreadPool, XEpollThreadSpawn, and XEpollThreadPool. (still needs tests)
2011-05-10configurator: move validation logic over
There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays.
2011-05-03add client_header_buffer_size tuning parameter
We're changing our default to 1K buffers to save memory. This should reduce memory usage of idle clients and lower pressure on the MRI GC. Rails applications using session cookies (the default) may want to up this to 2K or more.
2011-04-30lower header buffer sizes for synchronous models
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...
2011-02-28use IO#wait instead of IO.select for single readers
It's a simpler interface and avoids allocating an array which is nice.
2011-01-06eliminate timed_read module
No need to split it out when there's only a single class using it.
2011-01-04globally refactor Range handling for responses
Rack::Utils::HeaderHash is still very expensive in Rack 1.2, especially for simple things that we want to run as fast as possible with minimal interference. HeaderHash is unnecessary for most requests that do not send Content-Range in responses.
2010-11-05avoid Errno::EAGAIN, harder
Errno::EAGAIN is still a problem under Ruby 1.9.2, so try harder to avoid it and use kgio methods. Even when 1.9.3 is available, kgio will still be faster as exceptions are slower than normal return values.
2010-10-22code shuffling for kgio
Despite the large number of changes, most of it is code movement here.