10 tips to boost up performance of your Ruby on Rails application

Hello guys!

I found a guideline which will help to boost up performance of your Ruby on Rails application. You should check this out.

Mehreen wrote in post #1163991:

Hello guys!

I found a guideline which will help to boost up performance of your Ruby on Rails application

<http://www.nascenia.com/10-tips-to-boost-up-performance-of-your-ruby-on-rails-application/&gt;\.

You should check this out.

I'd like to! Link is dead.

Regards, Dante Elrik Founder, CloudShopper

It works for me. Some of the suggestions are way out of date though, being written in 2011!

Colin

While some of the advice here is good, it represents a very confused view of performance optimization. For instance, #2 is just plain bad advice for performance (but good for modularity) - partial rendering has a ton of overhead in Rails. #3 doesn’t speak to performance at all. DRY (#4) is not a performance principle. I stopped when the author repeated #4.

Don’t repeat yourself. Don’t repeat yourself.

Yea I agree that article is a little cursory. Each one of those 10 bullet points could be an entire blog post itself. Also it doesn’t even mention avoiding n+1 queries, which I think is absolutely essential for ever new Rails dev to learn up-front.

I agree that some up-front stuff is important, like: CDNs, properly using the asset pipeline (compressing & Gzipping, moving to a CDN, etc), indexes on the fields you search against. However, in a company with a high-traffic website and investors who want a return on their money, it’s all about cost-benefit. So you need to think about the payoff for some of your efforts.

For example, in my experience spriting your images actually costs a lot of developer time with very little payoff when it comes to browser performance. (I’m thinking in the scenario where you might have fewer than 10 images on any given page. If you have hundreds of 25x25 images spriting makes a lot more sense.)

If you do the essentials up-front (listed above), the best strategy for optimization is to use a tool like New Relic to identify your bottlenecks and then optimize anything slow bit-by-bit. It’s tedious but you get a better result in the long run.

-Jason