Measuring the Impact
You'll learn how to quantify main-thread blocking using TBT and FID metrics to measure real-world performance impact.
What Are TBT and FID?
After learning to identify and fix main-thread blocking issues, you need to measure whether your optimizations actually helped. Two critical metrics do this:
Total Blocking Time (TBT) measures the sum of all time periods when the main thread was blocked long enough to prevent input responsiveness. Specifically, it adds up the "blocking portion" of all long tasks (anything over 50ms) between First Contentful Paint and Time to Interactive.
First Input Delay (FID) measures the actual delay users experience when they first interact with your page—the time between when they click a button and when the browser can respond.
The Analogy
Think of TBT as measuring how long a checkout line was blocked during opening hours, while FID measures how long the first customer actually waited. TBT gives you the full picture during lab testing; FID captures real user frustration in the field.
Why Both Matter
TBT is a lab metric you measure during development with tools like Lighthouse. It's predictable and reproducible, perfect for catching regressions.
FID is a field metric collected from real users via the browser's Performance API. It shows actual impact but varies based on when users interact.
Measuring in Practice
Use Chrome DevTools Performance panel to see TBT calculations, and the Web Vitals library to collect FID from real users. Good targets: TBT under 200ms, FID under 100ms.
Key Takeaway: TBT quantifies blocking time in lab testing, while FID measures real user input delay—together they prove whether your main-thread optimizations actually improved responsiveness.