Session is a type of cache

Michael Urquiola replied to Peter Bromberg at 21-Nov-07 09:29

When you hold objects in the middle tier in memory, that is caching.  The only point I was trying to make is this lets say for arguments sake that view state is 500kb for a particlar view.  For one user it is much faster to put this session/cache on the server than to stream it back and forth to the client, if you make it 100 or 1000 users you're now talking about a serious amount of memory for all those concurrent users.  If you instead stream it out memory is not an issue.  One of the first PerfMon stats I look at when doing load  testing is %TimeInGC, and the only way to bring down that number is to reduce the amount of memory you are allocating and keeping alive in the middle tier.  Saying that memory is cheap misses the point entirely, a particular 32 bit application can allocate 2gb of memory, an ASP.Net 1.1 app will start running into Out of Memory exceptions at 800mb, how expensive it is doesn't  matter if there is not enough of it to go around.

As to the GridView, I agree with you.  Which is why we wrote our own that does not use viewstate and does all its sorting filtering client side and only retrieves data not html from the server.




Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Article Discussion: Keep ViewState out of Page for Performance Enhancement Redux - Peter Bromberg  22-Oct-07 08:44 8:44:27 PM
      Performance versus scalability - Michael Urquiola  24-Oct-07 10:46 10:46:39 PM
          The article uses Session to store ViewState, not Cache. - Peter Bromberg  21-Nov-07 05:39 5:39:29 PM
      Session is a type of cache - Michael Urquiola  21-Nov-07 09:29 9:29:31 PM
View Posts