Read my latest article: Was away on vacation (posted Sun, 11 May 2008 22:33:00 GMT)

Rails Development Performance Tip - dev_mode_performance_fixes 7

Posted by Robby Russell Wed, 29 Aug 2007 02:57:00 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
    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.

  2. 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… :)

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

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

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

    happily.

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

    small typo cd vendor/plugins;

  6. Avatar
    Robby Russell Wed, 29 Aug 2007 14:37:43 GMT

    bryanl, Thanks, I’ve updated the post!

    Josh, Keep up the good work! :-)

  7. 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.

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

Comments