Methods to Improve the Performance of ASP. NET Applications

Source: Internet
Author: User

The following experiences are summarized from <ASP. NET performance programming> and verified.

1. controls that do not participate in the PostBack mechanism, do not use server controls, try to use static HTML tags
2. Use release configuration during compilation
3. Remember to set debug to false when the application is officially put into use.
4. Set smartnavigate to true, which can make the viewer feel that your performance is improved.
5. If the page does not have to be updated, remember to add the <% @ outputcache duration = "60" varybyparam = "*" %> statement, which can greatly improve the performance.
6. In addition to those records that need to be paged and those records that must be updated in real time, remember to use the cache object to cache other database entries.
7. Disable the viewstate attribute of controls that do not require viewstate.
8. Disable the enablesession attribute of pages that do not need to use the session.
9. If you need to obtain data from a database on a large scale, group the scattered data acquisition tasks in batches. That is to say, try to obtain the data you want by using the database connection with the minimum number of times, merge tasks that can be merged with stored procedures as much as possible
10. Try to use stored procedures instead of SQL statements

More .....
You can read the <ASP. NET performance programming> book, which is the most advanced topic I have ever seen about performance.

 

The above content is transferred fromPrague, hero

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.