Do require: false and start putting require statements in files that use these gems. By disabling eager loading we ensure every gem is not auto-loaded. Candidates for require 'false' include:
I do not think we use these: action_mailer, active_job, active_record.
Group some gems in an group :assets such as uglifier.
All of these changes minimally would shave off 150 ms from load time, but could a lot more. Of course, the entire production app would need to be carefully tested.
Follow the example of https://github.com/discourse/discourse/blob/master/Gemfile
Do
require: false
and start putting require statements in files that use these gems. By disabling eager loading we ensure every gem is not auto-loaded. Candidates forrequire 'false'
include:These are candidates for omitting:
Can explore replacing
gem 'rails', '4.2.11'
with:And then requiring in config/application.rb only what is used:
I do not think we use these: action_mailer, active_job, active_record.
Group some gems in an
group :assets
such asuglifier
.All of these changes minimally would shave off 150 ms from load time, but could a lot more. Of course, the entire production app would need to be carefully tested.
┆Issue is synchronized with this Asana task by Unito