Rob Zolkos

I'm Rob Zolkos: Web Developer, business aficionado and technology enthusiast.

60% Faster Rails bootup with Rails 3.1 with Ruby 1.9.3

Yesterday I had a few minutes spare to test out Ruby 1.9.3which has just hit ‘preview’ status. I was very interested to see what the startup time would be on Rails 3.1 as some effort has gone into not only speeding up Rails but Ruby. As I get more and more fanatical about testing my apps quickly, especially after watching Gary Bernhardts Destroy All Software screencasts, I’m finding that I’m continually looking for ways to speed things up. It seems that 1.9.3 will assist!

I ran a little non-scientific experiment. All I did was create a new Rails 3.1rc5 app and added the rspec-rails gem. I installed Ruby 1.9.3.preview with the instuctions here. And then created a small rspec spec file that did nothing.

require 'spec_helper'

describe User do
end

But together with the time command I was able to see the following interesting stats.

time rspec spec/

With Ruby 1.9.2-p290 the load time was 6.632s. The same app on Ruby 1.9.3.preview loaded in 2.629s (a 60% improvement)

Thanks to various improvements (but I suspect primarily “the patch”, things are looking brighter for Rails bootup times. And that is a great thing!


comments powered by Disqus