ASP Performance test report (turn) (iii)

Source: Internet
Author: User
Performance three, enable buffering to the performance impact how much?

If buffering is enabled, the server does not send page content to the browser until the entire page is processed. Buffering can be enabled in two ways: by setting the Response.Buffer property within an ASP page, or by using the server settings. The two methods are tested separately below.

3.1 Enabling buffering via script

Adding Response.buffer=true,iis to the front of the ASP script will buffer the page content:
<% OPTION EXPLICIT
Response.Buffer = True
Dim FirstName
...
/app1/buffer__1.asp Fragment

Best record = 7.05 ms/page
Response time = 6.08 MS/page
difference =-0.97 milliseconds (13.7% reduction)




Efficiency has been greatly improved, but there are better.

3.2 Enabling buffering by configuring the server

Buffering is turned on by default in IIS 5.0 and II4 4.0 requires manual setup. Set the method as follows: Open the Properties dialog box for the Web site. In this dialog box, select the Configuration button on the Home Directory page, and then under Application options, select Enable buffering. We removed the Response.Buffer statement prior to this test.
Best record = 7.05 ms/page
Response time = 5.57 MS/page
difference =-1.48 milliseconds (21% reduction)




This is the fastest response we've seen so far, with a 21% lower response time than the best record ever. From now on, the following tests will be used as a benchmark for this result.

3.3 views

Buffering is an excellent way to improve performance, so it is important to set the server to enable buffering by default. If for some reason, enabling buffering causes the page to behave abnormally, simply add response.buffer=false to the page. When buffering is enabled, the user will not see anything until the entire page is processed, which is a disadvantage. Therefore, for complex pages, it is a good choice to occasionally invoke Response.Flush to update the browser content.

Now we have the following rule:

Buffering is always enabled through the server configuration.



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.