I’m working on a pretty large (and still growing) project and the bigger
it gets the slower development mode becomes, but runs really fast in
production mode. So I assume the slowdown at the beginning of each
request is caused by the fact that it reloads everything. It currently
has about 85 models, 75 controllers, and 11k Code LOC.
It’s becoming really painful. For instance, I’m working on a page that
involves a lot of ajax calls. One call shows the following in the
Completed in 0.38060 (2 reqs/sec) | Rendering: 0.02327 (6%) | DB:
But firebug timed it at 5.38 seconds. So that means reloading my
is validating values on a form and enabling/disabling a button) added an
additional 5 seconds?? And it keeps getting slower over time if I don’t
restart the server often. And I’m on an a MacBookPro with 2 gig of ram.
Some of the other developers here aren’t quite as lucky as me and it’s
even more painful for them.
At this point it’s almost making more sense to run with cache_classes =
true and just restart mongrel when needed. I even considered writing a
program to monitor files in my project and restart the server when one
changes… another thought was to try and split up the app into separate
smaller apps and share things between them, however there’s so much
shared logic and model relationships, that I don’t think it would be
Is there anything else I can do to optimize the development environment?
Is this a common thing with large rails projects or could there be
something I’m doing wrong? What could I do to try and track down the
slowness in development?