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.