Monday, April 28, 2008

Asp.Net Web applications Performance tuning

1) Turn off Tracing unless until required
trace enabled="false"
2) Turn off Session State, if not required
<@%Page EnableSessionState="false"%>
3) Disable View State of a Page if possible
4) Set debug=false in web.config
5) Avoid Response.Redirect
5. A) To reduce CLR Exceptions count, Use Response.Redirect (".aspx", false) instead of response.redirect (".aspx").
6) Use the String builder to concatenate string
7) Avoid throwing exceptions
8) Use Finally Method to kill resources
9) Use Client Side Scripts for validations
10) Avoid unnecessary round trips to the server
11) Use Page.ISPostBack
12) Include Return Statements with in the Function/Method
13) Use Foreach loop instead of For loop for String Iteration
14) Avoid Unnecessary Indirection
15) Use "ArrayLists" in place of arrays
16) Always check Page.IsValid when using Validator Controls
17) Use Paging
18) Store your content by using caching
19) Use low cost authentication
20) Minimize the number of web server controls
21) Avoid using unmanaged code
22) Avoid making frequent calls across processes
23) Cleaning Up Style Sheets and Script Files
24) Design with ValueTypes
25) Minimize assemblies
26) Encode Using ASCII When You Don't Need UTF
27) Avoid Recursive Functions / Nested Loops
28) Minimize the Use of Format ()
29) Place StyleSheets into the Header
30) Put Scripts to the end of Document
31) Make JavaScript and CSS External

No comments: