Effect of buffer enabling and execution speed in ASP

Source: Internet
Author: User

ASP Buffer startup method:

1. Set the default cache status to start in IIS
-Click website properties in IIS
-Select the Home Directory, press Alt + G, or click Configure.
-Select the application option and enable buffering.

If this parameter is not set, in Win2k, the default cache for IIS is on.
2. ASP program is forced to open or close
-Force open, in the appropriate position or in the statement
Response. Buffer = true
-Force close, in the appropriate position or in the statement
Response. Buffer = false

The impact of enabling and disabling the buffer on the execution time of ASP programs:

I tested a common ASP page and called only one of the fastest MSSQL database operations. The execution speed is as follows:

-When buffering is disabled, the average execution time is 296 milliseconds.
-When I enable buffering, the average execution time is only 22 Ms.

I doubt that the execution speed of an identical ASP page is so large in the same mechanism environment. After some tests, we found that most of the execution time of ASP pages is not spent on the database, database operations only took about 20 milliseconds, and other 270 milliseconds are spent on the output HTML page.
.

Suggestions after testing:

If the data output from your page is not huge and most of the execution time is too large, we recommend that you enable cache.
If the size of page output data cannot be estimated, or the output is large, enabling the cache may occupy too many server resources. We recommend that you disable the buffer.

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.