Re: Page creation and usage
Re: Page creation and usage
- Subject: Re: Page creation and usage
- From: Chuck Hill <email@hidden>
- Date: Sun, 28 Mar 2004 12:16:31 -0800
You should not do this. You will have exactly the problems you mention
below. WO internally caches the templates so pageWithName is actually
quite efficient. Let WO do the infrastructure work for you. That's
what it was built for. Its good at it. Focus on you app's
functionality.
If you want to optimize even more you can make the components stateless.
chuck
On Mar 28, 2004, at 12:03 PM, Ron Wagner wrote:
I have a question about page creation and usage. For pages that get
used over and over again I have been creating the page with
pageWithName("pageName"), storing the instance, and re-using the
instance for multiple request-response loops. I started doing this to
save the time of creating the page and to reduce memory footprint for
having multiple instances of the same page.
Is this OK to do, or should I be calling pageWithName for each
request-response loop? I am wondering if I am affecting backtracking
in a bad way or some other negative which I am not considering. If I
have instance variables in the java classes for the WOComponents, will
I be tromping over them each time the page is used, or are they stored
somewhere in a context for each request-response loop?
Any other insights would be appreciated.
Thanks,
Ron Wagner
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.