PERF: enable bootsnap globally

If people wish to opt out they can use `DISABLE_BOOTSNAP = 1`

Bootsnap is production ready and was tested on our production
servers for safety.

Promoting it now so it is enabled globally.

Will result in faster application boot
This commit is contained in:
Sam Saffron 2020-06-10 12:20:17 +10:00
parent 7e1c93326f
commit 7589551d68
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -12,7 +12,7 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
if (ENV['FORCE_BOOTSNAP'] == '1') || (ENV['RAILS_ENV'] != 'production' && ENV['RAILS_ENV'] != 'profile') if (ENV['DISABLE_BOOTSNAP'] != '1')
begin begin
require 'bootsnap' require 'bootsnap'
rescue LoadError rescue LoadError