1. In IIS, set the buffering default state to start
-Click Site Properties in IIS Click Site
-Select Home directory, press ALT+G or click the Configure button
-Select application options, select Enable buffering
If not set, the default buffering for IIS is open in Win2K
2. ASP program 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
Impact of buffered turn off on ASP program execution time:
I tested a normal ASP page, calling only one of the fastest MSSQL database operations, the speed of execution is as follows:
-The average execution time is 296 milliseconds when buffering is turned off
-When I turn on the buffer, the average execution time is only about 22 milliseconds.
I very much doubt that an identical ASP page, in the same mechanism environment, the implementation of the difference speed should be so great. After some testing, found that most of the ASP page execution time is not spent on the database, the database operation takes only 20 milliseconds, the other 270 milliseconds or so spent in the output of HTML page
On
After the test to everyone's suggestion:
If your page does not output a huge amount of data, and most of the execution time is spent on the page output, it is recommended that you open the cache.
If the data for the page output cannot be estimated, or if the output is more numerous, enabling caching may take up too much server-side resources, and it is recommended that the buffer be turned off.
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.