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.

On Wed, Jul 22, 2009 at 10:41 AM, Alexey
Petrushin[email protected] wrote:

What do you think?

Posted via http://www.ruby-forum.com/.


Rilindo F.
AOL Instant Messenger: rilindo
Google Talk: [email protected]
Web S.: http://www.monzell.com
Primary: [email protected]
Secondary: [email protected]
"Rich bachelors should be heavily taxed. It is not fair that some men
should be happier than others. – Oscar Wilde

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. . .

On Wed, Jul 22, 2009 at 3:38 PM, Alexey
Petrushin[email protected] wrote:

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.

Posted via http://www.ruby-forum.com/.


Rilindo F.
AOL Instant Messenger: rilindo
Google Talk: [email protected]
Web S.: http://www.monzell.com
Primary: [email protected]
Secondary: [email protected]
"Rich bachelors should be heavily taxed. It is not fair that some men
should be happier than others. – Oscar Wilde

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

On Jul 22, 8:38 pm, Alexey P. <rails-mailing-l…@andreas-
s.net> wrote:

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.

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs