summaryrefslogtreecommitdiff
path: root/config/boot.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-06-08 18:26:23 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-06-08 18:26:23 -0400
commitf331bbefec8a1101ac7f1eaa3d5a5f0afa61bd9e (patch)
tree09feeba21873dbc0612b476e727f817e6816b2a9 /config/boot.rb
parentedd8d91194ce79cb5d77973c40436b98eb4d97fc (diff)
downloadgitlab-ce-f331bbefec8a1101ac7f1eaa3d5a5f0afa61bd9e.tar.gz
Add Bootsnap to all environments to reduce application startup timers-bootsnap
Diffstat (limited to 'config/boot.rb')
-rw-r--r--config/boot.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/boot.rb b/config/boot.rb
index f2830ae3166..17a71148370 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -4,3 +4,15 @@ require 'rubygems'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
+
+# Default Bootsnap configuration from https://github.com/Shopify/bootsnap#usage
+require 'bootsnap'
+Bootsnap.setup(
+ cache_dir: 'tmp/cache',
+ development_mode: ENV['RAILS_ENV'] == 'development',
+ load_path_cache: true,
+ autoload_paths_cache: true,
+ disable_trace: false,
+ compile_cache_iseq: true,
+ compile_cache_yaml: true
+)