ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Web Performance Basics in Detail

Updated on May 1, 2020
Prachi-Sharma profile image

Prachi works as a full-stack developer, specialized in e-commerce and mobile app development.

To boost the performance of a website, it is important to learn about web performance measuring techniques. This starts by understanding the vocabulary and metrics, first.

Measuring techniques can give us reliable information about our present status. Through this, we can set goals and perform the measurement again to find out the improvement in performance.

Here, we are going to understand the analytics methods required to improve web performance. For this, we’ll also learn optimization vocabulary and metrics relevant to web performance.

We must keep in mind that without measuring, we can’t improve. So, measuring plays an essential role in performance improvement.

To simplify it, we’ll use loading and responsiveness as two different categories to measure the performance.

1. Performance Measurement: Loading

Traditionally, web performance is computed using the following two methods:

  1. window’s onload event
  2. response time taken by the server

These methods are no longer quite important because, now, the performance is measured through the user’s perception.

Definition

Loading is a performance measurement that determines how speedily a website or web content appears on the user’s browser. This includes fetching of the resources from the server and its rendering on the screen.

By user’s perception, we mean how fast the user views the site and its content. It is, indeed, more important than the loading time and can be specified by the moment the user perceives the important information on the screen.

To understand this, we’ll start by discussing the waterfall chart. This is the most important chart for determining the performance level.

Waterfall Chart

The waterfall chart is an analytical diagram that displays the way resources are downloaded and parsed by the engine in a timeline. It depicts the sequence and interdependencies of resources. The modern version of the waterfall chart also points out the significant events occurred during the loading process.

Note: The waterfall chart is quite similar to the Gantt diagram. The Gantt diagram is used for project management. It shows the cascade effect on several tasks.

The chart also helps us identify the performance quality of our website, it can be either good or bad. We only need to see the number of rows and the number of resources that block the parallel downloads.

Figure 1 shows the waterfall chart of a website’s loading process.

The chart shows one row for each downloaded resource.

The X-axis represents the time that increases towards the right.

The Y-axis represents the resources that are displayed sequentially the way they are organized by the web engine.

The lines in different colors represent different stages in the performance measurement.

Figure 1
Figure 1

Waterfall charts are illustrated in two different ways. This depends on the user’s visit:

  1. Empty cache: When the user visits the site for the first time and there’s no cached data available.
  2. Cached: When the user visits the site for the second time and has all the possible files cached in the user’s local storage.

If everything’s set correctly, Figure 2 perfectly depicts the difference between the empty cache and cached waterfall charts.

Figure 2 shows the Empty cache and Cached version of the waterfall chart in order. The difference is clearly noticeable if the site is performing well. The chart is produced using webpagetest.org

Figure 2
Figure 2

Resource Timing

The below figure shows each row with a horizontal bar. The bar depicts the resource lifecycle in the timeline. Performance tools help you divide these bars in different colors to illustrate the different phases of the resource lifecycle.

Figure 3 shows each row with a horizontal bar. The bar depicts the resource lifecycle in the timeline. Performance tools help you divide these bars in different colours to illustrate the different phases of the resource lifecycle.

Figure 3
Figure 3

Color bars depict every phase of the request processing. The larger the bar, the longer will be the time. There’s a fixed order and the phases are noted as follows:

  1. DNS lookup: It is the time taken by the web engine for converting the domain host to an IP address using the DNS system. Since you’ll have several resources obtained from the same domain, the DNS lookup will be calculated only once as the web engine cache the result.
  2. Initial connection stage: It is the stage of the TCP handshake. It is required for every high-level protocol such as HTTP to use TCP. There are cases when this stage is not possible for every processed resource. If HTTPS is used, then the stage also includes the time of SSL handshake.
  3. Time to First Byte (TTFB): It is the time taken by the server to send back the response to the client. When the client, whether a browser or an app, sends a request, the server reacts by sending a response. The total processing time is shown in green. In case, the server is busy or there’s a requirement of fetching the data from several databases or third-party resources, the processing time increases and you can see a bigger green section in your chart.
  4. Final stage: The final stage includes the time taken to download the bytes of all the resources. It is represented by a blue bar on the screen. Its area depends on the present connection and bandwidth between the client and the server.

Note: Almost each of the performance tools has used the same colors for similar resources. But there are some tools that make use of different colors, so be attentive while conducting the analysis. The same order is followed i.e. the first is DNS lookup and the last is content download.

There’s one more stage involved here, which is not shown explicitly, but you can identify it easily. This is content parsing and execution.

Additionally, there are blocking and non-blocking resources. While blocking resources restrict the downloading or parsing of other resources, non-blocking ones don’t interfere in the downloading or parsing process.

When the parallel processing is blocked by a resource, a gap occurs between the tail of the blue area and the head of the upcoming resource’s stage. The gap represents the time taken by the web engine to process the resource. For example, the execution of the JavaScript code.

Figure 4 clearly shows the gap between the tail of the blocking resource and the head of the next resource. It gives an example of blocking resources that hinder the processing of other resources. In this scenario, the waterfall chart displays the rendering time in the form of a gap.

Figure 4
Figure 4

Yellow and red background colors

Yellow and red colors mean that the resources were not downloaded properly. In this case, the received HTTP code is not 200 (OK).

A yellow color means the resource is moved to another URL. In this case, the HTTP code is either 301 (moved permanently) or 302 (moved temporarily).

A red color means a blocking error has occurred. In this case, the HTTP code is either 404 (not found) or 500 (server error).

Comments

    0 of 8192 characters used
    Post Comment

    No comments yet.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://maven.io/company/pages/privacy

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)