code reloading by timer (in development env)

Hello, i'm working on huge rails project and it's terribly slow in
development mode.

There are lots of code and lots of AJAX requests, so it's very slow as
(i guess) it reloads all the code several times per one page.

I'm wondering, maybe there is a way to speed it up? Maybe it's possible
to reload it for example every 15 seconds? Or even better - every 15
seconds check for changed files and reload only if there is changes.

What do you think?

Silly question: Are you using Webrick or Mongrel?

When I prepped up a little rails dev app in Webrick, it was so slow I
wanted to chuck it. Then I put in Mongrel and it speed things up by
literally a 100+ percent.

i think Foster is right. webrick is bit slower. if you use Mongrel
then its become
more faster. you can make mongrel cluster to make it more faster. in
spite of making
the cluster if you think your app is still slow then you can use
performance
analysis tool like new relic. it will help you to see which part of
your coding
is taking the most of the time.

in my case i have found that eager loading makes the code bit faster
as
it always reduce the query moreover you can cache the static content
of you site even you can partially cache the content of page.

these small things will help you to make your site faster

Silly question: Are you using Webrick or Mongrel?

No, I'm using Mongrel.

these small things will help you to make your site faster

I'm talking about the development environment, in the production (in
cluster) it works fast :).

The problem is here (config/development.rb):

config.cache_classes = false

if i change it to

config.cache_classes = true

it works really fast.

So i hoped maybe there is a way to reload it more rarely.

Okay, now that makes sense. :slight_smile:

Now that said, my understanding is that turning cache off in
development is a bad thing, because that meant that new code will not
be executed automatically until you restart the server. I could be
wrong, though. . .

There's nothing builtin - doesn't mean there's not a way for you to
change it though! I'd start by looking at how the existing code
reloading stuff works.

Fred

The solution :slight_smile:
http://github.com/thedarkone/rails-dev-boost/tree/master