SameShirtEveryDay.com

Personal blog of the one called Alex Gorbatchev, from Toronto, Canada.

dev_mode_performance_fixes

Posted on August 29th, 2007 by Alex Gorbatchev. In Rails. No comments yet...

dev_mode_performance_fixes plugin by Josh Goebel promises to speed up your Rails development server.

THE PROBLEM

So, what is the problem? It’s the fact that classes aren’t cached in development and that Rails insists on flushing them at the end of every request resulting in large chunks of your apps code having to be loaded, parsed, and reinterpreted for EVERY SINGLE request… which is SLOW.

THE IDEA

Why don’t we only reload the files when they have actually changed? Store the file names and their last modified time and then stat all the files before every request… if any are newer, kill the objects they originally defined and let the Dependency auto-loading code reload the objects from disk.

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

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet, be the first one!

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> , rel="nofollow" in use - no link dropping, no keywords or domains as names; do not spam, and do not advertise!

home
Subscribe to this blog Follow me on Twitter My bookmarks on Delicious My photography on Flickr