Thursday, November 12, 2009

Tips to improve performance for an asp.net application

1) Use Connection Pooling and Object Pooling
2) Turn off Tracing unless until required
3) Turn off Session State, if not required
4) Disable View State of a Page if possible
5) Set debug=false in web.config
6) Avoid Response.Redirect as many places
7) Use the String builder to concatenate string
8) Avoid throwing exceptions
9) Use Finally Method to kill resources
10) Use Client Side Scripts for validations
11) Avoid unnecessary round trips to the server
12) Use Gzip Compression
13) Use Page Output Caching and Proxy Servers
14) Use Per-Request Caching
15) Use Page.ISPostBack
16) Include Return Statements with in the Function/Method
17) Use Foreach loop instead of For loop for String Iteration
18) Include Return Statements with in the Function/Method
19) Avoid Unnecessary Indirection
20) Use "ArrayLists" in place of arrays
21) Always check Page.IsValid when using Validator Controls
22) Use custom Paging
23) Store your content by using caching
24) Use low cost authentication
25) Minimize the number of web server controls
26) Avoid using unmanaged code
27) Return Multiple Resultsets
28) Avoid making frequent calls across processes
29) Cleaning Up Style Sheets and Script Files
30) Design with ValueTypes
31) Minimize assemblies
32) Encode Using ASCII When You Don't Need UTF
33) Avoid Recursive Functions / Nested Loops
34) Minimize the Use of Format ()
35) Place StyleSheets into the Header
36) Put Scripts to the end of Document
37) Make JavaScript and CSS External
38) Use DataReader instead of Dataset
39) Make Enableviewstate property as false for the components(particularly for heavy items like datagrid, datalist etc) if it is not necessary.
40) Use xmlhttprequest object or scriptmanager to minimize post backs.

No comments:

Post a Comment

...

Obstacles are those frightful things you see when you take your eyes off your goal.------> by Henry Ford