diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-12 14:16:39 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-12 14:24:06 -0700 |
commit | 7e2d8e6a1b23cf459becfaaf0525a930bb2bd9e3 (patch) | |
tree | 60636cf607d266498c3424fa3e24a1ce06ef7a97 /lib/chef_zero/endpoints/data_bags_endpoint.rb | |
parent | 9ee2a128e8765aa206c7595e404123737696147b (diff) | |
download | chef-zero-7e2d8e6a1b23cf459becfaaf0525a930bb2bd9e3.tar.gz |
Optimize requires for non-omnibus installs
require is quite slow in Ruby and doing requires for things you've already required is also slow. We've used this simple hack in Chef to speed up our requires. In the omnibus installs we patch how rubygems works to make this somewhat pointless, but this will help non-omnibus installs
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef_zero/endpoints/data_bags_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/data_bags_endpoint.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef_zero/endpoints/data_bags_endpoint.rb b/lib/chef_zero/endpoints/data_bags_endpoint.rb index ec07343..3475e87 100644 --- a/lib/chef_zero/endpoints/data_bags_endpoint.rb +++ b/lib/chef_zero/endpoints/data_bags_endpoint.rb @@ -1,4 +1,4 @@ -require "ffi_yajl" +require "ffi_yajl" unless defined?(FFI_Yajl) require_relative "rest_list_endpoint" module ChefZero |