By Govinda Berrio - 11/17/2008
HI All,
I'm relatively new to asp.net development, but I think understand many of the concepts involved. I'm working on a project that uses SF and I'm very happy with how it's helped me.
I've noticed that on the web server, the worker process for this application grows very large (~140MB+). I understand this is because the BO is stored in the session between postbacks. Unfortunately there are situations in my app where I have to load a BO with a large number of records. So I'd like to know if anyone has a strategy for removing unnecessary BOs from the session state.
I'll share an idea that was considering. Group BOs using different ApplicationBasePages for each section of the site. Store the name of the current basepage in the session. In each page, check for the current basepage changing. If it is changing, call Dispose() on each BO for the old basepage. This should make it so only those BOs in the current section are loaded at taking up memory.
Another option (in addition to the above) could be to have the BOs only contain a page of the information at a time. But I couldn't find anything related to this on the site. And I'm not sure how that would work with the WebBusinessBindingSource.
Any advice would be greatly appreciated.
Thank You,
Govinda
|
By Trent L. Taylor - 11/18/2008
That is a good idea and one thing I would bring up on this point is that you may not actually need these types of BOs to be created in the ApplicationBasePage. When I am working on web apps that are going to be doing a lot of processing, I will not put my processing BOs in the ApplicationBasePage, only the BOs that I want to be managed by the session state and/or to which I will be binding. Worker BOs like this I will create in code so that I can do exactly what you were referring to here...Dispose(). But if you want to keep this in the session, then just Dispose and recreate the session variable. This would have the same effect and you wouldn't have to create a lot of different base pages to try and manage this.
|
|