Over a million developers have joined DZone.

Improve Rails Performance

DZone 's Guide to

Improve Rails Performance

· Performance Zone ·
Free Resource

Blogger Marian Posăceanu offered some great tips for improving rails performance on his blog last week; the code snippets are what he calls "gems" to improve, even marginally, Rails' speed.

This is a first in the series of articles regarding on how to improve (even marginally) Rails's performance. I'll focus on a bunch of gems that speed up, in some cases considerably, small parts of Rails, like the html escaping, the String#blank? and JSON utils.

Also included are benchmarking methodologies and some other resources for Rails developers.

Depending on what your app is doing you might want to add to your Gemfile some of these gems, I usually add them all just for good measure (you might want to check your RAM usage and have a full test suite before doing this though).

The oj gem is just great for a Rails based JSON API where you can drop the views and just serialize using representers or your pattern of choice.

Check out the full post here.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}