Must Read Rails Performance Article

A couple of days ago, Alex Dymo from Pluron sent me an email describing some of the great work he has done optimizing the performance of their online project managment software Accunote. His great insight was that their performance problems were caused by allocating too much memory, thus forcing Ruby’s Garbage Collector to frequently run ruining performance.

Using a patched version of ruby and ruby-prof, Alex was able to more than double performance (with hints of more to come) and reduced memory consumption by 75%, or 750MB (yes – that is Megabytes). Alex does a wonderful job of documenting his approach with a series of blog posts here and here.

The main culprit was Rail’s handling of attributes, which is dreadfully designed (an obvious case of the simplest solution to a problem is the wrong solution – something I’ve been meaning to blog about for almost a year now ). But he also implicated Ruby’s built-in benchmarking module.

Even better, Alex provided patches to ruby core (already accepted), Rails (already accepted) and ruby-prof. We’ll also gladly accept his patches, and since its about time for a ruby-prof refresh, we’ll spin out a new release as soon as we can. More to follow.

Leave a Reply

Your email address will not be published. Required fields are marked *