I'm wondering if having many gems in the Gemfile are slowing down the site? Are they loaded when needed or are all loaded at every page request?


It really depends on what gems you are using (i.e. middleware vs. just some small library). However in the general case, more gems = more code to process = more time = slower site.

One tip that I can suggest to you is in your Gemfile, do something like this:

gem 'gemname', :require => false

To not have rails require this gem on startup. The downside of course is that you have to manually call require 'gemname' whenever you want to use that gem. It's all a balance of performance vs. ease of use.


Bundler what is the require false on the gemfile means

I think that will answer your question.

Your Answer

