Rails is slow to load

Hi,

I was just wondering if this was normal or not.

I was running ruby 1.8.7 with rails 3 - rc. (Currently trying 1.9.2-
rc2 but the same problem)
It takes rails a while to load. (a while as in 10-15 seconds)
It will take a while before I can use the console , or before running
a test or starting up the server.

This doesn’t seem normal to me when I watch some screencasts.
If this is not normal behaviour, how can I figure out the source of
the problem?

This doesn’t seem normal to me when I watch some screencasts.
If this is not normal behaviour, how can I figure out the source of
the problem?

Maybe they edited their videos to prevent wasting time watching rails
load?

For comparison, from typing script/server to having a running instance
of mongrel hosting out a rails app on my machine takes ~2 seconds.

Well on my Dual Core MacMini running Ruby 1.8.7 and Rails 2.3.2 going
from “ruby script/console” to getting the prompt takes around 9
seconds.

This delay seems to be manifest across all the rails tasks. “rake
test” seems to take an age to get running, between 3 to 5 seconds
before it starts to event set up the test.

In production this is not a problem as the application very rarely has
to restart, but it is a bit of a pig for testing.

That did cross my mind, but I was just wondering though.
Mostly because it didn’t look as though the transition from running
the command to the actual test running wasn’t edited.

But oh well.

The MacMini runs OSX

Hi,

can you tell us what is your OS ?
MS-Windows ruby VM is VERY much slower than Nix or OSX ones…

you can also try to use the Thin server instead of Mongrel :
http://code.macournoyer.com/thin/

It’s very simple :
“gem install thin”
“thin start” from your project folder

let us know :slight_smile:

On 5 août, 10:36, Peter H. [email protected]

Eric Y. wrote:

This doesn’t seem normal to me when I watch some screencasts.
If this is not normal behaviour, how can I figure out the source of
the problem?

It may simply be your hardware/OS combination…

At work, an Ubuntu VM on top of Win7, 1 core of a Core2Duo, 2.5GHz, 1 GB
RAM allocated, ruby 1.8.7, rails 2.3.8; starts up in about 4 seconds

Same machine, Windows 7 Enterprise, the other core, same ruby and rails
and app; starts in about 7 seconds (ruby + windows = yuck)

At home, Ubuntu 10.04 on a Phenom II X4 940, 8GB RAM, same ruby and
rails and app, its about 2 seconds.

As always, YMMV.