[Original] building a high-performance ASP. Net Site Chapter 5-Performance Tuning Overview (later)

Source: Internet
Author: User

Build high performanceASP. NETSite Chapter 5-Performance Tuning Overview (later)

This article mainly describes how to locate the performance problems of the Site Based on some simple tools and Simple phenomena. 

The topics in this chapter are as follows:

General performance tuning process

Analyze page loading information using analysis tools

Analyze performance bottlenecks using analysis tools

 

SeriesArticleLink:

Build high performanceASP. NETSite Opening

Build high performanceASP. NETOne site Analyze the page processing process (front-end)

Build high-performance ASP. Net Site 2 optimize HTTP requests (front-end)

Building a high-performance ASP. Net site depends on the three details

Building a high-performance ASP. Net Site Chapter 5-Performance Tuning Overview (previous)

Design of large-scale high-performance ASP. NET System Architecture

Building a high-performance ASP. Net Site Chapter 5-Performance Tuning Overview (Part 1)

Building a high-performance ASP. Net Site Chapter 5-Performance Tuning Overview (Part II)

Building a high-performance ASP. Net Site Chapter 6-performance bottleneck diagnosis and preliminary optimization (Part 1)-identifying performance bottlenecks

Build a high-performance ASP. Net Site Chapter 6-performance bottleneck diagnosis and preliminary optimization (next article)-simple Optimization Measures

Building a high-performance ASP. Net Site Chapter 6-performance bottleneck diagnosis and preliminary optimization (next article)-reducing unnecessary requests

Building a high-performance ASP. Net Site Chapter 7 how to solve memory problems (previous article)-Managed Resource Optimization-in-depth analysis of the garbage collection mechanism

Building a high-performance ASP. Net Site Chapter 7 how to solve memory problems (previous article)-Managed Resource Optimization-monitor CLR Performance

 

 

 

 

Analyze performance bottlenecks using analysis tools

The previous section describes how to useFirebugTo generate a waterfall map of page loading information. It also describes four major problems that slow page loading:

1.The server spends a lot of time Parsing. AspxIt takes too long.

2.Transfer Between the server and the browserHtmlToo long

3.Images andFlashFile loading takes too long

4.JSAndCSSLoading takes too long

Next we will judge based on the waterfall chart: the reason for slow page loading is what causes it.

 

1. How to Determine: the server spends a lot of time parsing . aspx too long .

In the figure below, you can see that the first timeline is particularly long:PurpleThat indicates the waiting time before the browser receives the first byte of the page. That is to say, in the browser requestDefault. aspxAfter the page, the browser remains in the waiting status. Only the browser acceptsDefault. aspxOfDomTo download other resources on the page.(CSS,Images, etc.). If you acceptDefault. aspxOfDomIf the waiting time is too long, the download of other resources is bound to be affected, and the loading of the entire page is slowed down.

 

 

 

If we are usingFirebugWhen generating a waterfall chart, we found a similar phenomenon above. The reason for slow page loading is probably that the server is ParsingDefault. aspxPage, generateHtmlThe text is too long. Why does it cause Server Resolution?Default. aspxIf the time is too long, further analysis is required. It may beCodePoor writing, such as loop issues, or database problems, such as slow data query or too much data (details in subsequent articles ).  

 

Note: color means:

 

 

 

2.How to determine: transfer between the server and the browserHtmlToo long

In the figure below, we can see that the purple line segment is short, that is, the server parsesDefault. aspxThe page time is relatively short,Gray,. The gray part indicates that the data is accepted for a long time, that isDomSent to the browser. This process takes a long time. As with the previous issue, this issue will also delay the download of other resources on the page, resulting in slow loading of the entire page. This problem may be caused by bandwidth problems, or excessive data.

 

 

 

3.How to judge: Images andFlashThe file loading time is too long.

As shown in, page parsing and transfer to the client are relatively short, but it takes a lot of time to load images on the page. Currently, browsers usually open multiple links at the same time to request multiple image resources in parallel, rather than one request by one. However, the number of links opened by the browser is limited (different browsers), andTCPThe link also takes time, not the more links, the better. The following describes how to reduce the loading time of images and other resources.

 

 

 

4.How to judge:JSAndCSSLoading takes too long to block page rendering

As shown inDefault. aspxAfter the page is loaded, the browser starts ParsingDom(From top to bottom, for exampleHead-> body...),Download resources. When the page is parsed and needs to be loadedCSSAndJSIn this case, the browser will go to the server to request these files.DefaultThe page will be blankCSSAndJSAfter loading, the page starts to download images, and the page will be displayed slowly.

The problem was resolved.

 

Today, we are here. From the next article, we have entered the analysis and optimization stage.

 

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.