From 47c50ed7ebb2a97c2d289eede169f3e2e3f5e89b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 9 Feb 2010 22:55:08 -0800 Subject: reorder commonly accessed HttpServer struct members Earlier elements of a Struct (in both Ruby and C) are faster to access, so put more-often accessed elements like :app first. This does not noticeably affect most applications, but may matter to some micro benchmarks somewhere... --- lib/unicorn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index e3e4315..e8d869b 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -34,9 +34,9 @@ module Unicorn # Listener sockets are started in the master process and shared with # forked worker children. - class HttpServer < Struct.new(:listener_opts, :timeout, :worker_processes, + class HttpServer < Struct.new(:app, :timeout, :worker_processes, :before_fork, :after_fork, :before_exec, - :logger, :pid, :app, :preload_app, + :logger, :pid, :listener_opts, :preload_app, :reexec_pid, :orig_app, :init_listeners, :master_pid, :config, :ready_pipe) include ::Unicorn::SocketHelper -- cgit v1.2.3-24-ge0c7