From 3b589335d56ab59aca6772b78eeb96335dc55455 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 22 Feb 2010 14:27:41 -0800 Subject: avoid needlessly preallocating read buffer Copy-on-write will always invalidate it regardless, and the first request is likely to be slow for any app. --- lib/unicorn/http_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 99c11c2..65b09fa 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -24,7 +24,7 @@ module Unicorn # Being explicitly single-threaded, we have certain advantages in # not having to worry about variables being clobbered :) - BUF = ' ' * Const::CHUNK_SIZE # initial size, may grow + BUF = "" PARSER = HttpParser.new REQ = {} -- cgit v1.2.3-24-ge0c7