The ASP. Net website performance improvement series comes from Asp.net site upgrade Mace secretes.
- Use waterfall chart for Macro Analysis
Here we use Firefox and firebug to generate a waterfall chart.
Firefox InstallationProgram: Http://www.mozilla.com/
Firebug installation: https://addons.mozilla.org/en-US/firefox/addon/1843/
Use the shortcut key F12 in Firefox to open firebug. Click "network" and select "enable ". When you browse the page, firebug generates a waterfall chart.
Place the cursor over a request. The page loading time consists of the following parts:
- Domain name resolution.
- Establish a connection.
- Send a request. Firefox limits the number of requests simultaneously. If the maximum data reaches, Firefox queues the request.
- Wait for response.
- Receive data.
- 'Domainloaded' event. The time from domain name resolution to Dom readiness. When Dom is ready, you can use js to operate on page elements, even if some elements are still being loaded.
- 'Load' event. The time from domain name resolution to full page loading. The page is fully loaded, including images.
Use a waterfall chart to classify bottlenecks:
- The homepage is generated too long. In the waterfall, the purple part (waiting for response time) indicates the time the browser waits before it receives the first byte. During this period, the download of other components will be delayed because the homepage tells the browser which images, JavaScript, and CSS files to load.
- The loading time of the home page is too long. The gray Department indicates that loading the entire page over the Internet takes too long. This will delay loading the pictures and other files at the bottom of the home page.
- The loading time of images (including flash) is too long. The browser downloads images in parallel, but there is a limit on concurrent requests. If a page contains many images, some images can be loaded only after other images are loaded. This increases the page loading time.
- JavaScript and CSS block page rendering. When an external Javascript file is loaded, rendering of other parts of the page stops. In this way, the Javascript at the back of the page can reference this JavaScript. CSS also blocks page rendering to Prevent Users From seeing "naked" pages.
Waterfall chart with a long homepage generation time
Homepage loading time is too long waterfall chart
The image loading time is too long. waterfall chart