[Opensource] Controller instantiation (in 4.02)

Vincent Gogan vincent.gogan at goganinc.com
Sun Jul 14 04:47:46 PDT 2002


I'm doing some profiling of my application and it turns out that a large
fraction (more than half) of my response time is from the intantiation of
controllers. I typically transition to five or six different controllers and
often transition within a controller during a single page generation.

I use both Controlller.transition and Transition.transition and notice that the
Controller method will avoid re-instantiating a controller if it is an internal
transition (good) but that the Transition method does not (not as good). Is
there any reason why "Transition" shouldn't behave the same way?

I'll also ask (perhaps naively) why Controllers need to be instantiated for
every request. It seems that all state information is safely encapsulated in
the request/response objects.

Thanks,

Vincent
vincent at cherniaksoftware.com




More information about the Opensource mailing list