From 718227c7319a4467b1db036ce1cbf9fdd2604bab Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 29 Dec 2023 12:26:13 -0600 Subject: [PATCH] Add bootsnap to improve boot speed (#413) changelog: Internal, Performance, Add bootsnap to improve boot speed --- Gemfile | 1 + Gemfile.lock | 4 ++++ config/boot.rb | 1 + 3 files changed, 6 insertions(+) diff --git a/Gemfile b/Gemfile index 8c040e84..06398d3f 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gem 'newrelic_rpm', '~> 8.0' gem 'pg' gem 'pry-rails' gem 'puma' +gem 'bootsnap', '~> 1.0', require: false gem 'redacted_struct', '~> 1.0' gem 'rgl' diff --git a/Gemfile.lock b/Gemfile.lock index e3a9d952..27b54992 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,6 +118,8 @@ GEM rack (>= 0.9.0) bloomfilter-rb (2.1.1) redis + bootsnap (1.17.0) + msgpack (~> 1.2) brakeman (6.0.1) builder (3.2.4) bullet (7.0.7) @@ -203,6 +205,7 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.4) minitest (5.19.0) + msgpack (1.7.2) nenv (0.3.0) net-imap (0.3.7) date @@ -383,6 +386,7 @@ DEPENDENCIES axe-matchers (~> 1.3.4) better_errors (>= 2.5.1) bloomfilter-rb + bootsnap (~> 1.0) brakeman bullet (~> 7.0) bummr diff --git a/config/boot.rb b/config/boot.rb index 30f5120d..5a2d291d 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. +require 'bootsnap/setup' if ENV['ENABLE_BOOTSNAP'] != 'false'