I’ve got a larger Rails 3.1 application. It’s getting super slow in development mode. I’ve tracked down part of the problem to slow class autoloading. I have a couple hundred models in my system and am using about 130 gems.
If my controller does nothing other than reference class names (i.e
def index
User
Order
Game
LineItem
# and so on...
render :text => ''
end
The load of the page can take almost one second, just for this with some of my models. The log looks something like:
Completed 200 OK in 762ms (Views: 3.2ms | ActiveRecord: 3.9ms)
I’ve tested this with Ruby 1.9.2 and 1.9.3.
This was largely fixed in Rails 3.2.