Web Performance Optimization 2

Source: Internet
Author: User

1. Preliminary diagnosis of site performance bottlenecks using waterfall charts

In general, the speed at which a Web page is opened is affected by the following:

1) It took too long for the server to convert the contents of the. aspx page into HTML.

2). aspx pages take too long to send content from the server side to the client.

3) pictures or Flash files on the page take too long to send from the server side to the client.

4) JavaScript and CSS files block page rendering.

We can use the waterfall chart to determine the performance of a page because of which one is causing the problem. FireBug, the developer tools that come with chrome, can generate a waterfall diagram. Firebug and Chrome (9.0 or later) view the waterfall chart via the Network tab. Below is a waterfall graph generated by firebug, a "people I care about" on Sina Weibo via Firefox.

Figure 1 Waterfall diagram

Each row in the diagram represents an HTTP request, and each request has a timeline that represents the time it takes for the request. If you put your mouse on a timeline, you can see the following information:

Figure 2 Time Line

U Domain Resolution: Search DNS Server and resolve the time spent on the IP address of the domain name, here is 0ms.

U Establish a connection: the time it takes the client to establish a connection to the Web server via an IP address, which is 562ms.

U send request: The time it takes the client to send a request to the Web server, which is 0ms.

U wait for response: The time it takes the server to start sending content to the client from the HTTP request to the beginning, here is 391ms. This time typically includes operations such as database queries, conversion of ASPX page content to HTML, and so on.

You receive data: The amount of time that the server's response is sent to the client, which is 94ms.

With this information, we can initially diagnose the site's performance bottlenecks.

1) First look at which request takes longer, look at the timeline information for this request, and determine if the server is responding slowly or the network problem.

2) If the time spent on each request is not significantly higher than the other, then look at the page is not the total number of HTTP requests too much. Because the browser has a limit on the number of concurrent connections to a single domain name, a batch of requests needs to be processed before another batch is sent. Assuming that the page has 100 requests, each request takes 1s, and the browser has a maximum concurrency limit of 10, then it takes 100/10*1s=10s time to finish processing the request.

With regard to the maximum concurrency, the Http1.1 standard is 2, while the current mainstream browser ie, FIREFOX, chrome to improve speed, respectively, modified to 10, 6, 6 (depending on the specific version may vary).

Web Performance Optimization 2

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.