John Topley’s Weblog

Rails Tip #9: Don’t Load What You Don’t Need

If you’ve frozen a version of Rails into the vendor/rails directory then you can configure your application so that it doesn’t load frameworks that you aren’t using. All you have to do is uncomment the line below in your config/environment.rb file:

config.frameworks -= [:action_web_service]

—This example is instructing Rails not to load the Action Web Service framework, which is going to shave approximately a third off your application’s memory usage.

Comments

There aren’t any comments on this post. Comments are closed.


Archives

  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012

More Archives


Sign In