Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Improve Rails Performance

DZone's Guide to

Improve Rails Performance

· Performance Zone ·
Free Resource

Sensu is an open source monitoring event pipeline. Try it today.

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.


Sensu: workflow automation for monitoring. Learn more—download the whitepaper.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}