Feb 21, 2007

Some hints for developing High-Performance ASP.NET Applications

I observed the following points to be kept in mind while developing application in ASP.NET

· Disable session state when you are not using it.
· Use Page.IsPostBack to avoid performing unnecessary processing on a round trip
· Save server control view state only when necessary
· Do not rely on exceptions in your code [Avoid try, catch block]
· Use the common language runtime's garbage collector and automatic memory management appropriately [try to avoid having objects with Finalize methods] see Automatic Memory Management.
· Use the HttpServerUtility.Transfer method to redirect between pages in the same application
· Use early binding in Visual Basic .NET or JScript code [Include a Strict attribute in the @ Page directive or, for a user control, in the @ Control directive]
· Use SQL Server stored procedures for data access
· Use the SqlDataReader class for a fast forward-only data cursor [SqlDataReader class offers higher performance than the DataSet class]
· Choose the data viewing mechanism appropriate for your page or application [DataGrid Web server control can be a quick and easy way to display data, but it is frequently the most expensive in terms of performance.]
· Cache data and page output whenever possible
· Be sure to disable debug mode
· Enable authentication only for those applications that need it
· Consider disabling AutoEventWireup for your application
· Remove unused modules from the request-processing pipeline

I also have delicious on ASP.NET Performance and optimization

No comments: