From 32998f5d56ada5968139cec91cea289e6ffa52bb Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 18 Oct 2013 17:58:47 +0000 Subject: remove unused unicorn constants to hopefully trim memory We'll probably drop the unicorn dependency in the future and use kcar once it gains the ability to parse server requests (and not just responses). kcar is descended from the unicorn parser anyways and supports the same enhancements (chunked encoding/trailers). --- lib/yahns.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/yahns.rb b/lib/yahns.rb index 373fca0..0499640 100644 --- a/lib/yahns.rb +++ b/lib/yahns.rb @@ -3,6 +3,13 @@ require 'unicorn' # pulls in raindrops, kgio, fcntl, etc, stringio, and logger require 'sleepy_penguin' +# kill off some unicorn internals we don't need +# we'll probably just make kcar into a server parser so we don't depend +# on unicorn at all +[ :ClientShutdown, :Const, :SocketHelper, :StreamInput, :TeeInput, + :SSLConfigurator, :Configurator, :TmpIO, :Util, :Worker, :SSLServer, + :HttpServer ].each { |sym| Unicorn.__send__(:remove_const, sym) } + # yahns exposes no user-visible API outside of the config file # Internals are subject to change. module Yahns # :nodoc: -- cgit v1.2.3-24-ge0c7