Here are the best practices to increase the performance of the application using Asp.net
- Always set debug=”false” in web.config production environment.
- Always set trace=”false” in web.config production environment
- Always use precompiled version of your code and also prefer web application project over website.
- Always compile your project in Release Mode before uploading application to production environment.
- Decrease your html kb as much as you can for that use tables less html using div’s and if possible then do not give big name to your control it will increase your html kb as asp.net uses client Id to differentiate all the controls.
- Use caching wherever posssible
- Remove blank spaces from your html it will increase your kb.
- use master pages to increase your performance.
- Prefer database reader over dataset unless and until you have specific reason to use database.
- Disable view state for your controls if possible.
- User Server.Transfer instead of response.redirect.
- Always use inproc session state if possible.
- Use Ajax for your application wisely. Lots of Ajax calls for a page will also decrease your performance.
- User System.Text.StringBuilder for string concatenation its 4 times more faster then the normal strings.
- Right JavaScript in .Js files and place it as bottom of the application.
- Use Separate CSS files for styling of application.
- Use coustom paging over normal paging while displaying huge amount of data in datacontrols
- Use Client Side Scripts for validations
- Use Stored Procedures Wherever Possible
No comments:
Post a Comment