Rails Development Performance Tip - dev_mode_performance_fixes
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!
Enjoying the content? Be sure to subscribe to my RSS feed.






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
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.
I just checked in some more fixes… make sure you’re using the latest version as well.
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… :)
Ditto… My 12” PB was having heart palpitations, can happy develop again.
happily.
small typo cd vendor/plugins;
bryanl, Thanks, I’ve updated the post!
Josh, Keep up the good work! :-)
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.
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.