Read my latest article: Planet Argon Blog (posted Wed, 17 Feb 2010 15:11:00 GMT)

Rails Development Performance Tip - dev_mode_performance_fixes

Posted by Robby Russell Wed, 29 Aug 2007 02:57:00 GMT

10 comments Latest by Josh Goebel Sun, 09 Nov 2008 09:57:35 GMT

When you’re running a Rails application in development mode, you might notice that it takes a little longer for requests to get processed and this is somewhat intentional as the framework is was designed to allow you to run the application and make live changes to it. This way you can do some basic functional tests from your web browser, work on HTML/CSS changes, or anything else that might need to be done in development mode.

Anyhow, this can be slow from time to time and if you’ve done much Ajax work, you might be familiar with how slow this can feel when performing some basic tasks. Well, thanks to Josh Goebel, we can speed up things with a new plugin he just released.

To install via piston:

cd vendor/plugins; piston import http://svn.techno-weenie.net/projects/plugins/dev_mode_performance_fixes/

To install via script/plugin:

./script/plugin install http://svn.techno-weenie.net/projects/plugins/dev_mode_performance_fixes/

Josh has posted some benchmarks and in my totally basic tests… shows about four times (4x) speed improvement for reqs/sec!

How does it work? From what I can tell, it works somewhat like autotest, in that keeps things cached and when it sees files modified, it re-caches the changes. He’s made it so that the stack doesn’t need to reload for each request, which is quite slow.

Since it’s development-mode only, I’d encourage you to install it and give it a whirl.

Have Fun!

Subscribe to my RSS feed Enjoying the content? Be sure to subscribe to my RSS feed.
Comments

Leave a response

  1. Avatar
    Matt Allen Wed, 29 Aug 2007 05:19:47 GMT

    I installed this plugin and it was ripping along until I started changing some code in the models and got the same stack trace all the time. On OS X 10.4.10

    http://pastie.caboo.se/91963

  2. Avatar
    Josh Goebel Wed, 29 Aug 2007 05:40:56 GMT

    Yeah, seems there are still a few kinks… Please see the thread at:

    http://beast.caboo.se/forums/2/topics/1313

    I’ve started it to keep track of these types of problems… please check it out.

  3. Avatar
    Josh Goebel Wed, 29 Aug 2007 05:46:15 GMT

    I just checked in some more fixes… make sure you’re using the latest version as well.

  4. Avatar
    Michele Wed, 29 Aug 2007 09:45:01 GMT

    Thanks for sharing it, Robby! It definitely made my day: my PB G4 was getting old (and slow), this one brought it back to life… :)

  5. Avatar
    James Hill Wed, 29 Aug 2007 10:32:28 GMT

    Ditto… My 12” PB was having heart palpitations, can happy develop again.

  6. Avatar
    James Hill Wed, 29 Aug 2007 10:32:43 GMT

    happily.

  7. Avatar
    bryanl Wed, 29 Aug 2007 11:09:12 GMT

    small typo cd vendor/plugins;

  8. Avatar
    Robby Russell Wed, 29 Aug 2007 14:37:43 GMT Recommend me on Working with Rails

    bryanl, Thanks, I’ve updated the post!

    Josh, Keep up the good work! :-)

  9. Avatar
    Josh Goebel Thu, 30 Aug 2007 10:40:33 GMT

    The latest versions make the original look like a child’s toy… make sure you all get the latest from svn… this is still under pretty heavy development as people report issues I’m resolving them.

  10. Avatar
    Josh Goebel Sun, 09 Nov 2008 09:57:35 GMT

    Back from the dead and working against Rails 2.1.2:

    http://github.com/yyyc514/rails_dev_mode_performance/tree/master/

    Check the PERFORMANCE file.

Share your thoughts... (really...I want to hear them)

Comments