Minimize main-thread work

The browser spent a long time busy, doing one thing at a time. While it is busy, your page cannot respond to taps or clicks.

What this warning means

The browser spent a long time busy, doing one thing at a time. While it is busy, your page cannot respond to taps or clicks.

Why it appeared on your page

Script evaluation is usually the largest part, followed by style and layout recalculation. Caused by large amounts of JavaScript running at load, framework hydration, and third-party scripts initialising.

Does it actually matter?

Matters a great deal if your INP is poor, and matters very little if your INP is fine. This is a diagnostic rather than a problem in itself — read it alongside your field INP, not on its own.

How to fix it

  1. Break long tasks into smaller pieces that yield to the browser, so input can be handled in the gaps.
  2. Run less code at load: defer what is not needed, and load features on interaction.
  3. Reduce the cost of third-party scripts, which frequently dominate this measurement.
  4. Move heavy computation that does not touch the page into a Web Worker.
  5. Reduce DOM size, which makes every style and layout recalculation cheaper.

On your platform

On Shopify and WordPress this is usually an app and plugin audit rather than a code change. On custom builds, hydration cost is the usual cause.

How to check you fixed it

Record in the Performance panel with CPU throttling and compare total blocking time and the number of long tasks. Then confirm with field INP over the following weeks.