about summary refs log tree commit homepage
path: root/lib/rainbows/coolio
DateCommit message (Collapse)
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-03-10switch from IO#sendfile_nonblock to IO#trysendfile
IO#trysendfile does not raise exceptions for common EAGAIN errors, making it far less expensive to use with the following concurrency models: * Coolio * CoolioFiberSpawn * Revactor * FiberSpawn * FiberPool This requires the new sendfile 1.1.0 RubyGem and removes support for the sendfile 1.0.0. All sendfile users must upgrade or be left without sendfile(2) support. IO#sendfile behaves the same if you're using a multi-threaded concurrency option, but we don't detect nor use it unless IO#trysendfile exists.
2011-01-31coolio/client: on_write_complete triggers read
This allows us to more aggressively handle pipelining as well as trigger future Kgio autopush behavior.
2011-01-21ev_core: force input to be given to app_call
No need to setting an ivar for most requests
2011-01-21ev_core: garbage reduction
We don't need to allocate new string objects for short-lived strings. We'll pay the price of a constant lookup instead.
2011-01-20ev_core: simplify setup steps
ev_core is always loaded after forking, so eliminate the need for extra setup steps for each concurrency model that uses it
2011-01-17ev_core: reuse buffer to avoid GC thrashing
Single-threaded concurrency models can reuse a single buffer to avoid thrashing memory and causing unnecessary GC activity.
2011-01-11event_machine: buffer reads when waiting for async.callback
We cannot trigger on_read events and invoke the HTTP parser and modify @env while we're waiting for an application to run async.callback. We also need to clear (and *maybe* re-set) @deferred if we're writing from async.callback
2011-01-11coolio: enable async.callback for one-shot body responses
The lack of an equivlent to EM::Deferrable prevents us from doing streaming/trickling responses, but a one-shot body should work fine for Coolio and generating dynamic responses.
2011-01-07rainbows/coolio/client: set LOOP constant in module
It's more natural and easier to maintain this way since Coolio::Client is always lazy loaded.
2011-01-07coolio/client: small optimizations
* lazy load uncommon classes: StreamFile, Response{Chunk,}Pipe * remove needless rainbows/coolio/sendfile module since we're lazily loaded now along with the rest of rainbows/coolio/client and only in the worker.
2011-01-06eliminate G constant and just use the Rainbows! module
Code organization is hard :<
2011-01-06simplify keepalive_timeout accounting
Easier just to use an instance variable
2011-01-04prefer Hash#merge! to Hash#update for consistency
It's more likely to be in the method cache since Rack::URLMap uses it and also is more consistent when looking at profiling output against various concurrency models.
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.
2011-01-04coolio: rename deferred_response => response_pipe
For consistency with the EventMachine code
2011-01-04simplify per-client keepalive state checks
This lets us simplify repetitive checks worry less about properly maintaining/closing client connections for each concurrency model we support.
2011-01-04coolio/master: small garbage reduction
Creating unnecessary string objects for every response is not a good idea.
2011-01-04coolio_thread_*: fix 416 response handling
After beefing up and enabling byte range tests for "sendfile" (and no just IO.copy_stream), we noticed threaded-Coolio variants did not handle invalid byte ranges correctly.
2010-12-28complete Rev => Coolio renaming
We use Cool.io internally everywhere now, but preserve Rev-based models for anybody using them.