Skip to content

Test your website now

Free, no card. We read only public pages.

Run free audit →

Performance · Medium severity

Total Blocking Time Too High: Reduce Long Main-Thread Tasks

Reduce high Total Blocking Time. Profile long tasks, cut unused JavaScript, split costly work, and distinguish the loading metric from real interaction latency.

Published · Updated

What the check tests

Check
perf.cwv.tbt - Total Blocking Time under 200 ms
Passes when
TBT sums the blocking portion (over 50 ms) of every long task between FCP and load. Good ≤ 200 ms, poor > 600 ms.
Scope
graded on every page crawled
Severity
Medium
Fix effort
large - a project
Impact when fixed
medium

In one paragraph

Total Blocking Time too high means the measured load accumulated excessive main-thread time beyond the long-task allowance. Profile the tasks responsible before changing script attributes. Reduce unnecessary JavaScript, split substantial work, and delay appropriate nonessential features. Interpret the documented WebAuditOS observation window separately from Lighthouse TBT, and test actual interactions rather than assuming loading-time improvement guarantees good INP.

Why it matters

A long task lasts more than 50 milliseconds. Its blocking contribution is the portion beyond that threshold: a 150 ms task contributes 100 ms. Work can include script execution and browser processing, so identify the actual stack rather than assigning every delay to a script's download size.

TBT is a laboratory loading diagnostic, not a Core Web Vital. INP evaluates responsiveness across qualifying interactions; field INP and a loading-only TBT result are not interchangeable. Reducing long tasks often helps, but later interaction handlers can remain expensive even after a clean initial load.

async and defer affect loading and scheduling. They do not make execution free or move ordinary script work off the main thread. A deferred script can still run a large blocking task once it executes.

How WebAuditOS evaluates this finding

The supplied implementation records long tasks from the start of its sampled mobile-style load until network idle or its fifteen-second observation limit. It sums the portion over 50 ms. Up to 200 ms passes; over 200 through 600 ms warns; above 600 ms fails. Unrendered or unmeasured pages are not graded.

This window differs from the FCP-to-interactivity definition used for Lighthouse TBT. Early tasks can therefore contribute differently. The configured CPU slowdown and single-run variation also affect comparison. A pass is not a measured guarantee about every interaction during a visit.

How to fix it

  1. Record a representative load with suitable CPU throttling. Find long tasks in DevTools and inspect the attributed call stacks, bottom-up cost, and initiating resources. Check whether first-party rendering, hydration, or a vendor dominates.
  2. Remove unnecessary code and route dependencies. Use bundle analysis to identify libraries and features shipped to pages that never need them. Preserve real functionality instead of deleting required work because its name looks large.
  3. Split work by meaningful user need. Load optional features when appropriate and design graceful loading states. Keep required consent or authentication controls correctly ordered; not every third-party script can safely wait for an arbitrary interaction.
  4. Break lengthy computation into smaller tasks and yield using supported scheduling patterns. Test compatibility and cancellation. A series of chunks that still monopolises scheduling may not create the intended responsiveness.
  5. Use a Web Worker for suitable computation when its architecture makes sense. Workers cannot directly manipulate the DOM, and moving or copying data has costs. This is not a universal way to relocate a rendering task.
  6. Reduce unnecessary hydration or rerendering through your framework's supported architecture. Server rendering, islands, or partial hydration can help particular applications, but must preserve matching output and safe caching.
  7. Review vendor scripts with their owners. Scope or remove unused tags and profile the change. A different firing time can move work outside this scanner's window without reducing the actual burden on the user.
  8. Test real interactions after load, including menus, typing, filters, and checkout. Use traces and field INP where available, then rescan comparable pages. Track visual stability and loading outcomes too.

What the fix can break

Code splitting can add a delay the first time a feature is used. Prefetch only where it has a measured benefit and does not compete with more important resources.

Changing execution order can break dependencies and make analytics measure a different population. Verify the business and privacy consequences instead of treating every deferred tag as a pure win.

Workers and architectural changes add complexity. Start with attributable unnecessary work and straightforward task reduction before undertaking a large rewrite solely for one laboratory score.

Questions

Is TBT the same as INP?

No. TBT describes blocking during a defined load window; INP concerns interaction responsiveness. Test both relevant outcomes.

Will adding defer fix a heavy task?

Not necessarily. It can change when code runs, but the execution can still block the main thread.

Why is the result different from Lighthouse?

The supplied implementation uses a different observation window and may have different run conditions. Compare definitions before interpreting a discrepancy.

Review LCP, inline scripts, and the Core Web Vitals guide.

Standards and sources

  • web.dev TBT
  • web.dev INP

In the report

Test this on your own site

Every scan runs perf.cwv.tbt on every page it crawls, on every plan. The finding carries this id, so a line in a report can be matched to the explanation above - and the free scan needs no account.