[Opensource] Controller instantiation (in 4.02)

Vincent Gogan vincent.gogan at goganinc.com
Mon Jul 15 08:47:00 PDT 2002


Thanks for the reply. Now, to ask an impolite question :-), when will 4.1 
be released? 

Thanks,

Vincent

-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Michael Rimov
Sent: Sunday, July 14, 2002 4:20 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] Controller instantiation (in 4.02)


At 07:47 AM 7/14/2002 -0400, you wrote:
>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.

They shouldn't be instantiated like that.  In 4.1 there's a controller 
factory that will instantiate one and only one under Struts, and cache 
instances under non server environments.

HTH!
                                                 -Mike

_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list