ASP.NET performance

I agreed with my collegages to attend the asp.net performance session. It was a very practical session. Interesting was to see the use of the Application Center Test tool which I used havilly on a former project. In the slides there where some high-water marks given for the various performance counters so that will be helpful to actually underdstand what you are actually measuring. Als more general tools like CLRprofiler will come handy.

Are there really programmers out there that don't use SqlProfiler? I can't imagine that. We had some discussion on whether to use a Dataset or DataReader: answer: use your own dataobjects and fill them with a datareader. I personally feel that every GUI layer that has a conection to a database (like the datareader does) is poor design so I liked the trade-off.

The the demo shifted to the use Cache(actually OutputCache). Incredible pefformance gain. I never digged very deep into it but a jump from 150 pps to 600 pps is very nice. in IIS6 this performance gain can become better as the kernel mode http.sys actually understands OutputCache hints from the asp.net worker process which means that subsequent request for the same page will be served by http.sys preventing any switch from kernel mode to user mode.

Published 07-02-2004 11:49 AM by Rene Schrieken

Comments

# re: ASP.NET performance

Output caching is really handy! But the problem with outputcaching is that it is bound to the application. There is no option for example to let output caching work in combination with forms authentication so you could cache output for a specific identity when this is necessary (for example, menu data used in a masterpage that depends on the users authorization to lower the needed database roundtrips. Very handy if you have a webcluster with 6 webservers with a heavy load ).

One solution to make use of the standard ASP.NET output caching is including the identity key as a query parameter and including that parameter as a variable for output caching on controls. The only problem then how to always include that parameter on a url. Not a problem if you do postbacks all the time but it is when you just link to other pages (very common problem...). I solved this by writing a handler that does a server.transfer to the same url with the identity key on the querystring. This really works excellent!

This way you have output caching for a specific identity if you would want to.

Friday, July 02, 2004 1:58 PM by Rene Schrieken

Leave a Comment

(required) 
(required) 
(optional)
(required)