wavii/rails-dev-tweaks — pull request #9 by arturopie (2012-10-25 20:22:04+00:00)
Title: Reload only if Application#reload_dependencies? returns true

Rails 3.2 reloads classes only when files actually change:

https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/middleware/reloader.rb#L63
https://github.com/rails/rails/blob/3-2-stable/railties/lib/rails/application.rb#L267

so if Application defines the method reload_dependencies?
(only defined in rails 3.2 so far) check if this method
returns true before calling cleanup! and prepare!. This way,
we don't reload classes unnecessary. This change makes a huge
performance improvement for big apps.