Re: Cache object vs Session, Application state for datagrid

Tech-Archive recommends: Speed Up your PC by fixing your registry




Josh Twist wrote:
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/


Thanks Josh for your help,
I'll try CLR Profiler...

.



Relevant Pages

  • Re: Problem with memory allocation
    ... If it is, then you MUST synchronize ... any attempt to read or modify it. ... It may not be a synchronization issue at all; it might be a memory overwrite caused by ... I remember another problem in the past, where this string was overwriting ...
    (microsoft.public.vc.mfc)
  • Re: Data consistency and "other" synchronization methods
    ... synchronize threads of control with respect to memory access. ... the compiler cannot assume anything about such functions - in particular it cannot assume that there are *no* membars buried somewhere there. ...
    (comp.programming.threads)
  • Re: Data consistency and "other" synchronization methods
    ... int someVariable; ... synchronize threads of control with respect to memory access. ... signal sending and reception, or pipe ...
    (comp.programming.threads)
  • Re: posix and lock-free algorithms
    ... > "synchronizes memory with respect to other threads". ... POSIX requires to be "synchronized with respect to other threads" is ... > If I have three dogs and I ask my daughter to walk the dogs, ... > It just says synchronize memory. ...
    (comp.programming.threads)
  • Re: Thread - Shared Memory
    ... You don't do IPC between threads. ... Processes have completely separate memory areas, ... Access to the critical code sections is policed by the monitor object ... you better synchronize access to the shared data. ...
    (comp.lang.java.programmer)