[Rails] Rails (internals) architectural question
linux user
fanoflinux at gmail.com
Wed Aug 9 13:28:32 GMT 2006
On 8/8/06, Jeremy Kemper <jeremy at bitsweat.net> wrote:
>
> On Aug 8, 2006, at 2:06 PM, linux user wrote:
> > On 8/8/06, Jeremy Kemper <jeremy at bitsweat.net> wrote: On Aug 8,
> > 2006, at 9:56 AM, linux user wrote:
> > > 1. If xxx_controller.rb is only loaded once does it mean there is
> > > only one instance of Controller serving all requests?
> >
> > A controller is instantiated per request.
> >
> > Is this true even in Production mode ?? If yes, this will degrade
> > performance of rails compared other web frameworks?.
>
> I think misunderstood you - seems you're referring to 'reloading
> Rails' as in reloading the entire app framework. That does not occur
> in production mode nor does it affect the issue you had in the
> original email regarding global variables.
>
> jeremy
I understand that reloading happens in Development to reload any source code
changes and it doesn't happen in production. And I am not talking about
reloading entire framework (the CGI approach) but My question is that if a
new instance of the controller is created for each request, that in itself
would be a performance overhead, when compared to a multi-thread model of
Java servlets in which there is only one instance of the servlet which
serves all requests.
Are you aware of any performance comparisons between Java Servlets and
Rails Controllers?? would be interesting to see how Rails
fares in comparison to Java Servlets.
I agree it will not have effect on the global variables.
-daya
_______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060809/94cc2db0/attachment.html
More information about the Rails
mailing list