Daily Brush for Website Speed: Embrace the Performance Budget Ritual

Rate this content
Bookmark

In this talk I will use the dental metaphor in order to introduce the performance budgets just like brushing teeth everyday to keep them clean and healthy you should do the same for your website by setting a performance budget and check it in every pull request in your pipelines, the target audience is mid-level to advanced, I will start by the example of the tooth decay and cleaning them then brushing them everyday as the dentist advice, then explain decay as the performance issue and performance budgeting is like the toothpaste and go from here with the different techniques that developers can do in order to prevent any loss in the performance wins they made.

FAQ

A web performance budget is a set of guidelines that restrict the size of a web page or its resources to ensure it performs well. It helps in preventing performance regressions affecting user experience and business goals by setting limits on metrics like load times, resource sizes, and the number of HTTP requests.

Just like dental hygiene requires regular maintenance to prevent problems, web performance needs continual attention to avoid regressions. Neglecting either can lead to issues that might not become apparent until they become severe, impacting overall health or user experience.

The two types of performance testing mentioned are synthetic testing (or lab testing) and Real User Monitoring (RUM, also known as field testing). Synthetic testing is consistent but not very accurate, while RUM provides real user data, making it highly accurate but not always free.

Tools for applying and monitoring a performance budget include Bundlesize, Webpack, Lighthouse CI for free options, and paid tools like SpeedCurve and Caliper. These tools integrate into development processes to help ensure performance targets are met without exceeding the set budgets.

Creating a performance budget involves measuring current site performance, setting specific performance goals based on metrics that are important to you, and then planning and fixing issues to meet these goals. Once satisfied with the performance, that benchmark can be set as your performance budget.

Making a performance budget stick involves integrating the budget into your development and deployment workflows so that it is enforced automatically. This includes setting concrete, actionable, and meaningful performance targets that align with business goals and making the budget visible and enforceable within the team.

If new features are degrading web performance, consider optimizing existing features, removing outdated or non-critical features, or rethinking the implementation of new features to ensure they don't impact critical performance metrics. Regularly testing and adjusting based on performance data is essential.

Real User Monitoring is crucial because it provides genuine insights into how real users experience your website, including data on geolocation, browser type, and internet connection. This accuracy helps in making informed decisions to optimize performance effectively.

Medhat Dawoud
Medhat Dawoud
13 min
12 Dec, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Talk provides an introduction to web performance and emphasizes the importance of setting performance goals and budgets. It explains the steps for creating and applying a performance budget and suggests various tools for performance budgeting. The Talk also highlights the need to make the performance budget concrete and meaningful, connect it to business goals, and integrate it into the development pipeline. It concludes by emphasizing the importance of maintaining performance and connecting with the speaker for more information.

1. Introduction to Web Performance

Short description:

Hi, everyone. My name is Ned Haddawood, a senior software engineer working for Miro and a Google expert in web performance. Today, I'm going to take you on a journey to impress web performance budget rituals. Imagine the website as a human body, with performance being the teeth. The more you feed your website with new features, the more you need to care about performance. Just like bad teeth, performance problems may not be immediately noticeable, but they can greatly impact your experience. So let's get started.

Hi, everyone. My name is Ned Haddawood. I'm a senior software engineer working for Miro and a Google expert in web performance. Today, I'm going to get you on a journey to impress web performance budget rituals. But before that, let's imagine together if the website is like the human body. Human body is growing up by eating food. The more you're eating food, the more you need to brush your teeth, the more you need to floss your teeth on a daily basis, right?

If you imagine the website is like a human body, I imagine performance as your teeth. So the more you are feeding your website with new features, the more you need to care about performance. The similarity between both of them, if you have a problem in teeth, you're visiting a dentist to fix it for you. If you have a problem in performance, you might visit or hire a performance expert to fix it for you. Both of them cannot be fixed because with a smaller check-in inspection, you will find out that you were not caring too much about them.

Some people might argue and say, Well, we are not doing that and turns out just fine. Just like these two gentlemen. But here are two facts. First of all, bad teeth are working too. You can eat on bad teeth, but believe me, you're not going to enjoy food. The other fact is that you don't know for how long you're not going to suffer from a problem from your teeth or your performance. It might take a long time until you find out a lot of problems jumping in. So the sooner you are acting, the better. So let's jump on.

2. Measuring Performance and Setting Goals

Short description:

If you have a problem, the first thing to do is to measure it to understand its magnitude. There are two types of performance measurement: synthetic testing and real user measuring. Synthetic testing is consistent and free, but not super accurate. Real user measuring provides accurate data but may not always be free. By using both methods, we can measure various metrics and set performance goals based on research thresholds and recommendations. It's important to differentiate between performance goals and performance budgets. If you encounter performance issues, it's crucial to address them and demonstrate their impact on the online business. Suggesting a performance sprint and focusing on enhancing performance can yield positive results.

If you have a problem. The first thing to do is to measure this problem to just see how big or small this problem so you can act on.

So measuring performance, we have two types of measuring performance. The first one is synthetic testing, also known as lab testing using something like Lighthouse. It has some benefits and has some bad things. The good thing is that it's very consistent and it's free and it's handy. Just easy to do, but it's not super accurate. This is a problem. Why is this not super accurate? Because it depends pretty much on the machine that we are running on.

The other type is RAM testing, real user measuring, or also known as fill testing. This is more interesting for us today. And this is coming with real user, plug in, opt in, and we're getting bunch of information about them that will help us take more and better decisions. It's like geolocation, browser and time, Internet connection, and so on. It's very accurate and we can rely on it, but it's not always free. One free option could be the Chrome User Experience Report. But other paid options, like Calibre, Speedcurve, and so on, are totally worth it as well. As you can see in a bit.

So, using both of them you can measure a lot of metrics that are very useful for us to measure performance and to decide whether our website is performant enough or not. They came as well with some research thresholds and recommendations. For example, in front of us, three recommendations based on the core web vitals. For the LCP for example, we need to make it under 4 seconds at least to make it work fine. And 2.5 seconds is a recommendation for a good experience for the user. This is very useful to set your performance goal. And there is difference between performance goal and performance budget as we will see in a bit.

So, you have a problem, you went to the manager and say, Hey, we have a serious problem in our performance. We have performance issues. Just said, alright, we can postpone it after the next quarter future, right? He showed the number. This is not affecting the business, right? But it is, of course, affecting your business, online business. And you suggest to make a performance sprint for the whole team focusing on performance to enhance it. You did a good job, you and your team, and you turned everything to be green.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced Conference 2022React Advanced Conference 2022
25 min
A Guide to React Rendering Behavior
Top Content
React is a library for "rendering" UI from components, but many users find themselves confused about how React rendering actually works. What do terms like "rendering", "reconciliation", "Fibers", and "committing" actually mean? When do renders happen? How does Context affect rendering, and how do libraries like Redux cause updates? In this talk, we'll clear up the confusion and provide a solid foundation for understanding when, why, and how React renders. We'll look at: - What "rendering" actually is - How React queues renders and the standard rendering behavior - How keys and component types are used in rendering - Techniques for optimizing render performance - How context usage affects rendering behavior| - How external libraries tie into React rendering
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Too much JavaScript is getting you down? New frameworks promising no JavaScript look interesting, but you have an existing React application to maintain. What if Qwik React is your answer for faster applications startup and better user experience? Qwik React allows you to easily turn your React application into a collection of islands, which can be SSRed and delayed hydrated, and in some instances, hydration skipped altogether. And all of this in an incremental way without a rewrite.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
React 18! Concurrent features! You might’ve already tried the new APIs like useTransition, or you might’ve just heard of them. But do you know how React 18 achieves the performance wins it brings with itself? In this talk, let’s peek under the hood of React 18’s performance features: - How React 18 lowers the time your page stays frozen (aka TBT) - What exactly happens in the main thread when you run useTransition() - What’s the catch with the improvements (there’s no free cake!), and why Vue.js and Preact straight refused to ship anything similar
The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Our understanding of performance & user-experience has heavily evolved over the years. Web Developer Tooling needs to similarly evolve to make sure it is user-centric, actionable and contextual where modern experiences are concerned. In this talk, Addy will walk you through Chrome and others have been thinking about this problem and what updates they've been making to performance tools to lower the friction for building great experiences on the web.
Optimizing HTML5 Games: 10 Years of Learnings
JS GameDev Summit 2022JS GameDev Summit 2022
33 min
Optimizing HTML5 Games: 10 Years of Learnings
Top Content
The open source PlayCanvas game engine is built specifically for the browser, incorporating 10 years of learnings about optimization. In this talk, you will discover the secret sauce that enables PlayCanvas to generate games with lightning fast load times and rock solid frame rates.
Power Fixing React Performance Woes
React Advanced Conference 2023React Advanced Conference 2023
22 min
Power Fixing React Performance Woes
Top Content
Next.js and other wrapping React frameworks provide great power in building larger applications. But with great power comes great performance responsibility - and if you don’t pay attention, it’s easy to add multiple seconds of loading penalty on all of your pages. Eek! Let’s walk through a case study of how a few hours of performance debugging improved both load and parse times for the Centered app by several hundred percent each. We’ll learn not just why those performance problems happen, but how to diagnose and fix them. Hooray, performance! ⚡️

Workshops on related topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured WorkshopFree
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
Featured WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
WorkshopFree
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
React Performance Debugging
React Advanced Conference 2023React Advanced Conference 2023
148 min
React Performance Debugging
Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.