Skip to content

Commit

Permalink
Optimize requires for non-omnibus installs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tas50 committed Aug 12, 2020
1 parent ba0f95f commit befa638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ffi-libarchive/archive.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "ffi"
require "ffi" unless defined?(FFI)

module Archive
module C
Expand Down

0 comments on commit befa638

Please sign in to comment.