From e21939d776673b2f8887adf7a5c64812b7d2e98e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Dec 2010 08:33:15 +0000 Subject: globally 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. --- lib/rainbows.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/rainbows.rb') diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 643bdd2..909e97e 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -39,9 +39,11 @@ module Rainbows require 'rainbows/const' require 'rainbows/http_parser' require 'rainbows/http_server' - require 'rainbows/response' - require 'rainbows/client' - require 'rainbows/process_client' + autoload :RackInput, 'rainbows/rack_input' + autoload :Response, 'rainbows/response' + autoload :ProcessClient, 'rainbows/process_client' + autoload :TimedRead, 'rainbows/timed_read' + autoload :Client, 'rainbows/client' autoload :Base, 'rainbows/base' autoload :Sendfile, 'rainbows/sendfile' autoload :AppPool, 'rainbows/app_pool' -- cgit v1.2.3-24-ge0c7