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/fiber/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/fiber/base.rb') diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb index b693451..ae885b6 100644 --- a/lib/rainbows/fiber/base.rb +++ b/lib/rainbows/fiber/base.rb @@ -57,7 +57,7 @@ module Rainbows::Fiber::Base def process(client) G.cur += 1 - process_client(client) + client.process_loop ensure G.cur -= 1 ZZ.delete(client.f) @@ -65,7 +65,7 @@ module Rainbows::Fiber::Base def self.setup(klass, app) require 'rainbows/fiber/body' - klass.__send__(:include, Rainbows::Fiber::Body) + Rainbows::Client.__send__(:include, Rainbows::Fiber::Body) self.const_set(:APP, app) end end -- cgit v1.2.3-24-ge0c7