From 8f7c396792c1e81ea14a7a275db9b0cd3ae96ec8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 5 Feb 2015 17:45:14 +0000 Subject: use require_relative to reduce syscalls at startup require_relative appeared in Ruby 1.9.2 to speed up load times by avoiding needless open() syscalls. This has no effect if you're using RUBYLIB or the '-I' option when running ruby(1), but avoids searching paths in other gems. This does not affect unicorn greatly as unicorn does not activate many gems, but still leads to reducing ~45 syscalls during startup. --- lib/unicorn/const.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/unicorn') diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb index 51d7394..26fa62b 100644 --- a/lib/unicorn/const.rb +++ b/lib/unicorn/const.rb @@ -41,4 +41,4 @@ module Unicorn::Const # :startdoc: end -require 'unicorn/version' +require_relative 'version' -- cgit v1.2.3-24-ge0c7