The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Feeling the slowdown blues after going 0.13?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
David Heinemeier Hansson

Posts: 484
Nickname: webster132
Registered: Jan, 2003

Rails is an open source web-application framework for Ruby
Feeling the slowdown blues after going 0.13? Posted: Jul 8, 2005 5:56 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by David Heinemeier Hansson.
Original Post: Feeling the slowdown blues after going 0.13?
Feed Title: Riding Rails
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: The knowledge diff for all things Rails
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by David Heinemeier Hansson
Latest Posts From Riding Rails

Advertisement

It’s somewhat ironic that we heralded Rails 0.13 as being a great move forward for the performance of Rails and then half the threads on the mailing list is about “Rails is sLOOOW!”. We’ve found the problems, though.

The first was with the MySQL/Ruby bindings, which called GC.start whenever MySQL#free was called. And we just put in MySQL#free in 0.13 to improve things after each select of rows. This caused the garbage collector to run every time you selected something. Doh!

The C-bindings didn’t have this problem, so it wasn’t discovered by the core team right away, and that was posed as the solution on the mailing list. Unfortunately, it’s not necessarily trivial to compile native bindings on all platforms (notably Windows), so having fast Ruby bindings was indeed important. They’re fast again, but if you upgraded to the C-bindings you can be happy that you’re even faster.

The second problem was that we plugged a big memory leak in development mode, but doing so caused a total of 8 runs through the so-called ObjectSpace after each action (basically iterating over all objects in the interpreter 8 times, eeks!). On big applications this could take a while. On Basecamp it took 2 seconds. After the fix went in where we just traverse the ObjectSpace once, it’s down to a comfortable 0.2 seconds (which is about 0.17 faster than it even was before the memory leak fix!).

Thus, Rails 0.13.1 is near forth coming. As in this weekend. If you cannot wait, and we certainly won’t blame you, there are new beta gems that consist purely of bug fixes. Upgrade with gem install rails --source http://gems.rubyonrails.org --include-dependencies.

Read: Feeling the slowdown blues after going 0.13?

Topic: ‘You’re probably sick of hearing this’ Previous Topic   Next Topic Topic: Low level programming languages

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use