Hi Josh,
Thanks for you reply,
I tried both,Session and Cache,
When I deal with datagrid that bound to dataset that may have about 900
-1000 records and trying to edit,delete,update some rows,very soon I'm
getting out of memory exception. Is 900 rows it too much to handle?
I'm not setting any features for cache or session,just
cache("myds")=ds
session("myds")=ds
Any suggestions?
Thank you,
Marina
Josh Twist - 03 Mar 2006 08:18 GMT
I doubt it's the 900 rows themselves causing you problems (it's not
that many) and if the dataset wasn't cached you'd have one instance
loaded into memory for each request (so potentially using even more
memory on a busy server).
Maybe there is something about the modification of datasets that makes
it chew up memory?? Also, you need to bear in mind that IIS/ASP.NET is
a multithreaded environment so different threads could be accessing the
dataset at the sametime. MSDN has this to say about the thread safety
of datasets: "This type is safe for multithreaded read operations. You
must synchronize any write operations."
Are you synchronising your write operations? This is a pitfall to
beware of, though I'm not sure this is what would be causing your
memory to be chewed up.
I'm afraid DataSets are not something I use in ASP.NET [see links
below] so It's really not an area I'm very strong in. If I was in your
position now I might use the CLR Profiler to see what's happening to
all your memory:
http://msdn.microsoft.com/library/en-us/dnpag/html/scalenethowto13.asp?frame=true
links
http://aspnet.4guysfromrolla.com/articles/050405-1.aspx
http://aspnet.4guysfromrolla.com/articles/051805-1.aspx
Good luck
Josh
http://www.thejoyofcode.com/
marina.sukhnev@thinknet.com - 07 Mar 2006 17:25 GMT
> I doubt it's the 900 rows themselves causing you problems (it's not
> that many) and if the dataset wasn't cached you'd have one instance
[quoted text clipped - 26 lines]
> Josh
> http://www.thejoyofcode.com/
Thanks Josh for your help,
I'll try CLR Profiler...