I understand that Development mode is slower than Production mode. Why
is that? As a newbie I only see a difference in database names. What
else is different?
I understand that Development mode is slower than Production mode. Why
is that? As a newbie I only see a difference in database names. What
else is different?
There are a number of differences, all related to performance and
convenience. For example, in development, everything is reloaded on
each request - so changes to your models and the like are instantly
viewable. This is great for developing but obviously has a speed cost.
In production however, you tend to set the system going and leave it
be - in this case, loading all the stuff once makes things quicker.
Basically, Rails’s environments set the system up to operate in ways
most beneficial to the task you are carrying out.
Hope that helps,
Steve
If you take a look at config\environments*.rb files you’ll see that the
settings for dev versus prd are different, primarily with regards to
cacheing. Essentially, development reloads everything every time (so
that you see your changes right away as you code). Production does not
do that, it caches up the classes and controllers, and as such is faster
the 2nd, 3rd, nth time you hit the application.
Pål Bergström wrote:
I understand that Development mode is slower than Production mode. Why
is that? As a newbie I only see a difference in database names. What
else is different?
Cayce B. wrote:
If you take a look at config\environments*.rb files you’ll see that the
settings for dev versus prd are different, primarily with regards to
cacheing. Essentially, development reloads everything every time (so
that you see your changes right away as you code). Production does not
do that, it caches up the classes and controllers, and as such is faster
the 2nd, 3rd, nth time you hit the application.
Of course. Cache. Logical. Should have figured out that one myself. 
Development mode reloads your models, controllers and all sorts of
stuff every request. Looks at your tables, updates models, etc…
Production does none of that. I pretty sure it’s explained in the docs.
On Aug 24, 2006, at 8:34 AM, Pål Bergström wrote:
Everything gets reloaded with every request in development mode. In
production mode, all your models, etc., are only loaded once.
–
Building an e-commerce site with Rails?
http://www.agilewebdevelopment.com/rails-ecommerce