In this article i will be explaining some of quick, easy and must use Asp.net Website Performance Improvement tips.
Asp.net Performance Improvement checklist is divided into 4 broad categories
- Identifying which part of asp.net web application requires optimization.
- Optimizing Asp.net web project to improve website performance
- Tips for writing code in order to enhance performance.
- Database Optimization to improve performance (I will be explaining for SQL Server but same tips will also apply to MySQL, Oracle or any other DB by changing syntactical meaning respectively.)
Identifying which part of asp.net web application requires optimization.
4 Monitoring tools like fiddler will also be helpful.
Optimizing Asp.net web project to improve website performance.
- Reduce asp.net page size - By reducing page size page it will get download quickly and thus load quickly on user's browser. It will also reduce bandwidth consumption of your website.
- Reduce number of HTTP request - It is very important to reduce number of HTTP requests on your server, it will help in reducing the server load and allowing more visitors to access your website.
- Avoid round trip to server.
- Only page which take user input or control whose values you want to persist on page postback will require viewstate. Example: If user press submit button and if there are error on page we should persist user input, so in that case we should make EnableViewState="true" for those control or may be at page level.
- Display pages or asp.net page which will not require page postback. Example: Page on which you are displaying customers information in datagrid, doesn't require viewstate so in this situation you can turn of viewstate.
- Remove white spaces between tags and lines of html render by asp.net page. In order to remove white space dynamically on all page, you should put "render" method inside master page class file.
- Try to use Jquery from CDN (Content distribution network) link for google CDN http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
- While adding JQuery try using min version (Example: jquery-1.6.2.min.js), which is less file size, since space and line break are removed from that. This will help in faster loading of file and also improves performance of web application.
- Avoid too many third party jquery controls rather make use of JQuery UI, which supports too many control within one js file.
Avoid round trip to server
- JQuery Ajax
Tips for writing code in order to enhance performance.
Database Optimizing tips to improve website performance.
2. In order to avoid too many joins, make optimal use of "xml datatype". That will help you to reduce needs of number of tables for small data structure, also be helpful in storing complex data-type. (In summary, I am in love of xml datatype, If you know correct way to use that, you can optimize performance.)
3 Check out DB Optimization tricks
4 Use PL\SQL Programming instead of making too many DB Request.
One of the most resource efficient and performance improvement technique is to make use of PL\SQL Programming inside stored procedure to avoid round trip. But be careful with this technique if you don't know how to use it efficiently, it may adversely affect performance.
Example: To Improve Performance through
Please note: I have been writing this article since long and I am still in process of improving this article on regular basis. Please share your suggestions and comments here so that it will help everybody to improve their website performance. At present most of performance improvement topics here are purely related to asp.net web forms, but i will be going to make a list of asp.net mvc specific performance improvement checklist in my future article. Thank you. :)