mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 05:23:40 +08:00
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:
parent
7e1c93326f
commit
7589551d68
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user