Web Development performance Optimization---code optimization chapter

Source: Internet
Author: User

1, the use of reasonable use of the cache

The best and fastest way to improve performance is by caching, of course, for any web developer who should use caching. The caching mechanism in ASP is very powerful, so we can improve the performance of Web application greatly by using the caching mechanism.

1. Page Caching 

2. Partial page Caching

3. Using the DataSource cache

4.Cache objects


2. Avoid frequent database connections

1. Use SQL or direct stored procedures to execute at once, and try not to execute them multiple times with code

2. Close database connection in time


3, appropriate to take the profile file frequently used files

1. Can use XML or configuration file settings for infrequently changed and small data volume


4, the resource file upload size verification

1. Strictly verify the upload image size

2, strict control upload flash animation and video size


5, as far as possible to avoid peak access to data operations and data Services

1. Perform timed tasks as far as possible to avoid peak visits

2, the corresponding fixed report 2 can take a predetermined format, avoid peak automatic extraction


6, data query using True paging

1. How much data to take


7, construction page jump coverage

1. Try to display the data with a marquee or toggle option to avoid refreshing the list back and forth to regain a large amount of data

8. Do not query all fields for data

1. Query data try not to select *



Web Development performance Optimization---code optimization chapter

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.