From f331bbefec8a1101ac7f1eaa3d5a5f0afa61bd9e Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 8 Jun 2017 18:26:23 -0400 Subject: Add Bootsnap to all environments to reduce application startup time --- config/boot.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'config/boot.rb') 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 +) -- cgit v1.2.1