Darren166 wrote:
self servicing, llblgen pro v2 (Dec. build) .net 2
Hi, I have a page with about 10 datasource controls on, mostly used to populate dropdown lists, some with 50 or more records. If I use CacheLocation = ViewState then the page gets way too big (in the region of 800K) so I use CacheLocation=Session which means the page is only 100k at its max. There will only be 1 to 2 users of the system at a time so I have no problem with the amount of data going into the session memory.
The viewstate is larger than the actual size it occupies, as the viewstate is a bin-> ascii converted string, so in memory the amount is smaller, also because in the session, real objects are stored, not serialized binary data.
However, the session variables are recreated every time the page is called (which will be many times during average usage as it is being used to edit product information for a large number of products). The session variables are given a different name every time so the session usage is growing and growing as all the old variables are still in there.
Hmm, you are absolutely right... I append a GUID every time the object is loaded, which is a bad thing.
I'll make sure this is corrected in the next build as this is a memory leak. I'll see if I can append the control ID to it instead.
Is there a way to clear out the old session variables used to cache the datasource?
Thanks,
Darren.
You can, clear all session variables starting with "__LLBLGENPRODATASOURCEDATA_". You can use the Keys property of the session object to obtain all keys inside the session.
Sorry for this inconvenience and thanks for pointing this out. These kind of things often go by unnoticed