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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Stephen Bartholomew
2006-Aug-24 12:45 UTC
[Rails] Re: Production faster than Development, why?
> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Benjamin Curtis
2006-Aug-24 12:54 UTC
[Rails] Re: Production faster than Development, why?
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 On Aug 24, 2006, at 5:34 AM, 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? > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
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?-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Cayce Balara 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. :-) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
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:> > 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? > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---