Web page Performance: Asynchronous operations

Posted on: Wed Mar 10 16:14:13 -0800 2010. Updated on: Wed Mar 10 16:14:13 -0800 2010.
Category: DotNet

Do you have any postbacks in your web site that take the backend more than 1 or 2 seconds? If you are not sure, you can enable Trace in your web.config or use Fiddler to see what's going on. The thing is, for every long lasting postback, the process thread in IIS is locked. IIS only has a certain number of threads in the Application Pool, depending on your configuration. So, if you have a site with many requests, performance would start to suffer when those thread pools max out constantly.

The solution is using Asynchronous operations. This involves setting the Async="true" in your page directive at the top as well as using web services on the codebehind.

Here is a good article that explains how to do this. Scroll down to the bullet with Asynchronous operations and download the sample source. HIgh Performance ASP.NET applications

Comments:

Add a Comment:

simple_captcha.jpg
(human authentication)


Ads

Categories

About

Random foliage

This website is meant to be a reference for ASP Dot Net developers. The entries are a compilation of things I've figured out how to do and that I deem useful to keep of track for future reference. Assumptions: web development with: C Sharp (vb sucks), visual studio 05/08, .net 3.5, meant for programmers. Written by: James Reategui.