Welcome!

@DevOpsSummit Authors: Pat Romanski, Elizabeth White, Yeshim Deniz, Liz McMillan, Zakia Bouachraoui

Related Topics: @DevOpsSummit

@DevOpsSummit: Blog Post

Web Performance 101: Critical Render Path | @DevOpsSummit #DevOps #WebPerf

The success of a website is directly proportional to the users’ digital experience

Web Performance 101: Critical Render Path
By Kameerath Kareem

The success of a website is directly proportional to the users’ digital experience. In the age of tech, savvy consumers, and competitive targeted marketing, speed matters. Users expect websites to load fast – the faster the user can view the webpage, the better the digital experience. We’ve already discussed how page size, images, and scripts can affect webpage load time and how each of these factors can be optimized to deliver the best user experience. In this article, we look at another important factor that determines web performance: critical render path.

What is critical render path?

The series of events involved in downloading website resources (HTML, CSS, and scripts), processing, and rendering the first pixel on the page is called the critical render path.

Tech Terms Explained
DOM Document object model defines the structure of the webpage, the HTML elements are rendered on the page based on the DOM.
CSSOM CSS is parsed to form the CSS object model which defines the style rules for the webpage.
Render Start The time taken to receive the first byte of data for the primary URL.

A browser needs to construct the structure of the page before rendering. The webpage data structure has two main components: DOM (document object model) and CSSOM (CSS object model). The browser parses the page HTML to form the DOM while the CSS is used to build the CSSOM.

The HTML is received by the browser in raw bytes, which is converted to characters. The HTML markup tokens/tags (for example: “<head>”, “<body>”) are then generated. These tags are then mapped to form nodes that make up the DOM tree.

full-processA similar process is carried out by the browser when it receives the CSS rules. The data is converted to characters and tokens, which is then linked to form the CSSOM tree.

cssom-treeThe DOM and the CSSOM together form the final render tree. The browser paints each node on the page following the render tree path. The entire process takes time and can impact the overall performance of the webpage.

How significant is the critical render path?

The initial view of the page, or what the user views above the fold, is critical to the end-user experience. Optimizing each step in the critical render path will speed up the rendering process of above-the-fold content, resulting in a better digital experience.

If the page HTML contains any render-blocking script or CSS then the render start will be delayed. Most websites are cluttered with multiple CSS files, scripts, and images which are not critical for rendering the first pixel. A user is more likely to wait for a page to load if an initial layout is displayed versus a blank page.

We can see this in action in the image below – the filmstrip shows the number of seconds the page remains blank before the first pixel is displayed; Amazon paints the first pixel within a second while Nordstrom takes 2.4 seconds.

amazonvsnord_renderstartThe time taken by the initial render sets the tone for the users’ digital experience. The user perceives a better web performance even if the rest of the page takes another second to fully load.

Let us compare the Critical Render Path from another perspective. The following waterfall graphs give us a better understanding of the page design and critical render path. The graph (below) for Axis Bank shows several scripts and other resources being loaded before the page starts to render – this can be detrimental to the end-users’ digital experience.

axisbankwaterfallIn contrast, the waterfall chart for US Bank gives an example of an optimized render path – there are fewer resources that need to be downloaded before the initial render.

usbankwaterfallWhat is the ideal render path?

To optimize the critical render path, we must focus on the following three factors:

  • Reducing the number of critical assets will allow the browser to start rendering the initial view/above-the-fold content quickly without waiting for the rest of the resources to complete loading.
  • Minimizing the byte size of the critical resources will reduce browser overhead and help speed up the render process.
  • By optimizing the order in which each critical resource is downloaded or lazy-loading assets that are not critical, we can minimize the round trips the browser needs to make to fetch each critical resource and in effect reduce the length of the critical render path.

To build the ideal render path for your webpage you must analyze the assets that are critical to the initial view. The resources must then be minimized and optimized to reduce the overhead on the browser. This will ensure the progressive rendering of the page begins as fast as possible, the page will continue to load and draw all the other elements but this will not disrupt what the user views above the fold.

The post Web Performance 101: Critical Render Path appeared first on Catchpoint's Blog.

Read the original blog entry...

More Stories By Mehdi Daoudi

Catchpoint radically transforms the way businesses manage, monitor, and test the performance of online applications. Truly understand and improve user experience with clear visibility into complex, distributed online systems.

Founded in 2008 by four DoubleClick / Google executives with a passion for speed, reliability and overall better online experiences, Catchpoint has now become the most innovative provider of web performance testing and monitoring solutions. We are a team with expertise in designing, building, operating, scaling and monitoring highly transactional Internet services used by thousands of companies and impacting the experience of millions of users. Catchpoint is funded by top-tier venture capital firm, Battery Ventures, which has invested in category leaders such as Akamai, Omniture (Adobe Systems), Optimizely, Tealium, BazaarVoice, Marketo and many more.

@DevOpsSummit Stories
In his session at 20th Cloud Expo, Mike Johnston, an infrastructure engineer at Supergiant.io, discussed how to use Kubernetes to set up a SaaS infrastructure for your business. Mike Johnston is an infrastructure engineer at Supergiant.io with over 12 years of experience designing, deploying, and maintaining server and workstation infrastructure at all scales. He has experience with brick and mortar data centers as well as cloud providers like Digital Ocean, Amazon Web Services, and Rackspace. His expertise is in automating deployment, management, and problem resolution in these environments, allowing his teams to run large transactional applications with high availability and the speed the consumer demands.
SYS-CON Events announced today that DatacenterDynamics has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY. DatacenterDynamics is a brand of DCD Group, a global B2B media and publishing company that develops products to help senior professionals in the world's most ICT dependent organizations make risk-based infrastructure and capacity decisions.
Most DevOps journeys involve several phases of maturity. Research shows that the inflection point where organizations begin to see maximum value is when they implement tight integration deploying their code to their infrastructure. Success at this level is the last barrier to at-will deployment. Storage, for instance, is more capable than where we read and write data. In his session at @DevOpsSummit at 20th Cloud Expo, Josh Atwell, a Developer Advocate for NetApp, will discuss the role and value extensible storage infrastructure has in accelerating software development activities, improve code quality, reveal multiple deployment options through automated testing, and support continuous integration efforts. All this will be described using tools common in DevOps organizations.
Andi Mann, Chief Technology Advocate at Splunk, is an accomplished digital business executive with extensive global expertise as a strategist, technologist, innovator, marketer, and communicator. For over 30 years across five continents, he has built success with Fortune 500 corporations, vendors, governments, and as a leading research analyst and consultant.
A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to great conferences, helping you discover new conferences and increase your return on investment.