Live data from Hacker News

Ruby 2.0 patch that could make Rails startup 2.2x faster

bugs.ruby-lang.org

1–10 of 22 posts

Re: Ruby 2.0 patch that could make Rails startup 2.2x faster

#2
This is exciting, the load time is one of the things that is most painful for me when working with Rails. It's really great when you can just add gems and get things working quickly but the load time tends to shoot through the roof...

Spork etc help but you still end up spending a lot of time waiting.

Re: Ruby 2.0 patch that could make Rails startup 2.2x faster

#4

This is exciting, the load time is one of the things that is most painful for me when working with Rails. It's really great when you can just add gems and get things working quickly but the load time tends to shoot through the roof... Spork etc help but you still end up spending a lot of time waiting.

Rails tests that takes too long are also painful too. If you try to speed them up, you might run into the problem of having to restart from scratch when you write stuff that need restarting to take effects.

Re: Ruby 2.0 patch that could make Rails startup 2.2x faster

#6

Some extensive background to the speedups that occurred in 1.9.3 with regards to loading so far along with the Xavier Shay work that didn't get included: http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-re...

Why didn't it get included?

Re: Ruby 2.0 patch that could make Rails startup 2.2x faster

#8
post #6

Some extensive background to the speedups that occurred in 1.9.3 with regards to loading so far along with the Xavier Shay work that didn't get included: http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-re...

Why didn't it get included?

I don't recall seeing a definitive reason given but I'd always assumed it was because Xavier's patch was very large and the Ruby core team are usually conservative with these things. The solution they came up with was merely a few lines of C. It was a bit of a cheap hack but provided much (but not all) of the real world benefit, so they went with it as it was easier to audit.

Re: Ruby 2.0 patch that could make Rails startup 2.2x faster

#10
The falcon patches for 1.9.3 together with GC tuning boosted our rails loading time by over 400% (Thanks to the answer on http://stackoverflow.com/questions/12892937/improve-rails-lo...). It's easy to see how required gems add up to the loading time, so I hope to see some more improvements.

This affects a lot of things: going into the console, running the server, running tests, running migrations, rake tasks etc...

Not trying to start a flame war, but I recently compared a live rails project with another live django project I was working on. Django was loading in under 1 second. Rails took almost 50 on a similar-spec host. Apples and Oranges. I know. After applying the falcon patches it dropped down to around 11 seconds. There's still an order-of-magnitude difference, but it's nice to see things going in the right direction.

Post reply on HN