Date | Commit message (Collapse) |
|
In concurrency models long keepalive times are cheap (and thus
more likely to be used), this allows Rainbows! to gracefully
shut down more quickly.
|
|
There's actually no reason we can't have these methods
in Rainbows::Configurator where it's easier to document
nowadays.
|
|
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.
|
|
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.
|
|
This allows us to more aggressively handle pipelining
as well as trigger future Kgio autopush behavior.
|
|
No need to setting an ivar for most requests
|
|
We don't need to allocate new string objects for short-lived
strings. We'll pay the price of a constant lookup instead.
|
|
ev_core is always loaded after forking, so eliminate the
need for extra setup steps for each concurrency model that
uses it
|
|
Single-threaded concurrency models can reuse a single
buffer to avoid thrashing memory and causing unnecessary
GC activity.
|
|
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
|
|
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.
|
|
It's more natural and easier to maintain this way
since Coolio::Client is always lazy loaded.
|
|
* 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.
|
|
Code organization is hard :<
|
|
Easier just to use an instance variable
|
|
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.
|
|
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.
|
|
For consistency with the EventMachine code
|
|
This lets us simplify repetitive checks worry less about
properly maintaining/closing client connections for each
concurrency model we support.
|
|
Creating unnecessary string objects for every response
is not a good idea.
|
|
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.
|
|
We use Cool.io internally everywhere now, but preserve
Rev-based models for anybody using them.
|