@DevOpsSummit Authors: Kevin Jackson, Elizabeth White, Liz McMillan, Pat Romanski, Tim Hinds

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
"Storpool does only block-level storage so we do one thing extremely well. The growth in data is what drives the move to software-defined technologies in general and software-defined storage," explained Boyan Ivanov, CEO and co-founder at StorPool, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, which can process our conversational commands and orchestrate the outcomes we request across our personal and professional realm of connected devices.
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, discussed how data centers of the future will be managed, how the public cloud best suits your organization, and what the future holds for operations and infrastructure engineers in a post-container world. Is a serverless world inevitable?
ChatOps is an emerging topic that has led to the wide availability of integrations between group chat and various other tools/platforms. Currently, HipChat is an extremely powerful collaboration platform due to the various ChatOps integrations that are available. However, DevOps automation can involve orchestration and complex workflows. In his session at @DevOpsSummit at 20th Cloud Expo, Himanshu Chhetri, CTO at Addteq, will cover practical examples and use cases such as self-provisioning infrastructure/applications, self-remediation workflows, integrating monitoring and complimenting integrations between Atlassian tools and other top tools in the industry.
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting challenge of adapting related cloud strategies to ensure optimal alignment, from managing complexity to ensuring proper governance. How can culture, automation, legacy apps and even budget be reexamined to enable this ongoing shift within the modern software factory? In her Day 2 Keynote at @DevOpsSummit at 21st Cloud Expo, Aruna Ravichandran, VP, DevOps Solutions Marketing, CA Technologies, was joined by a panel of industry experts and real-world practitioners who shared their insight into an emerging set of best practices that lie at the heart of today's digital transformation.