# Production faster than Development, why?

**URL:** <https://www.ruby-forum.com/t/production-faster-than-development-why/66266>\
**Category:** Rails\
**Created:** [August 24, 2006, 2:34pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266 "2006-08-24T14:34:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 24, 2006, 2:34pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266/1 "2006-08-24T14:34:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 24, 2006, 2:55pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266/2 "2006-08-24T14:55:56Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 24, 2006, 2:55pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266/3 "2006-08-24T14:55:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 24, 2006, 3:04pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266/4 "2006-08-24T15:04:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 24, 2006, 3:38pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266/5 "2006-08-24T15:38:04Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 24, 2006, 3:05pm UTC](https://www.ruby-forum.com/t/production-faster-than-development-why/66266/6 "2006-08-24T15:05:58Z")

</div>

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](http://www.agilewebdevelopment.com/rails-ecommerce)
