If controller is rebuilt each time when we uses redirect_to?

Hi,

Does anyone know, if a controller is built each time,
when we use “redirect_to” ???

Thanks you very much.

Saiho


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Hi !

2005/12/9, Saiho Y. [email protected]:

Does anyone know, if a controller is built each time,
when we use “redirect_to” ???

What do you mean by ‘rebuilt’ ?

Hi,

As I understanded (I could be worng), when a request
is sent to Rails, Rails will create a controller
object to answer that request, after that the
controller object will be destroyed by Rails. There is
no object pool inside of Rails.

if we use “redirect_to” from page A(controller A) to
page B (controller B), I think the controller A is
destroyed, then Rails creates controller B. (Am I
correct?) I wonder if we redirect page A/f1 to A/f2
(same controller), is the controller is destroyed and
then recreate???

Thanks you very much!!!

Saiho

— Francois B.
[email protected] wrote:

François Beausoleil
http://blog.teksol.info/


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

redirect_to from action A to B is no different from if you type in the
URL for
action B in your browser and submit it. A new controller instance is
created
for every request.

Kent.

On 12/9/05, Saiho Y. [email protected] wrote:

Saiho

I wouldn’t worry about it. Chances are if your page is slow, you’re
pulling too much data from the database or something. If your
controller is really that big, I’d also consider splitting it up into
multiple controllers.


rick
http://techno-weenie.net

Hi,

Thanks you very much for the information, but I wonder
if each time rails receives a request and recreate an
instance of controller, is it too heavy? for a simple
controller, it is quit correct, but if we a “huge”
one, it may not be the best solution… is there
someway, we can optimize this…?

thanks you very much

Saiho

— Kent S. [email protected] wrote:

page B (controller B), I think the controller A is

protection around

If God really exists, I would like to
know what the dinosaurs have done to
deserve their extinction.

Water is unknown to fishes,
until they discover air.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

On 12/9/05, Saiho Y. [email protected] wrote:

Hi,

Thanks you very much for the information, but I wonder
if each time rails receives a request and recreate an
instance of controller, is it too heavy? for a simple
controller, it is quit correct, but if we a “huge”
one, it may not be the best solution… is there
someway, we can optimize this…?

Hint: Don’t try to optimize anything until you can prove that it’s
your application’s bottleneck.

On Dec 9, 2005, at 1:43 PM, Saiho Y. wrote:

Saiho

Relative to the rest of the processing happening on each request,
the time it takes to instantiate your controller object would be
the least of your worries. It’s negligible in the grand scheme
of things.

Your controllers should not be “huge” anyway.

Are you having some specific performance problems?


Scott B.
Lunchbox Software
http://lunchboxsoftware.com
http://lunchroom.lunchboxsoftware.com
http://rubyi.st