Skip to content
Bugwise
Menu

Long task

Also called: Main thread blocking

Work that keeps the browser's main thread busy for more than 50 ms, so taps and key presses have to wait.

Definition

The main thread runs the page's JavaScript, handles input and draws frames, one thing at a time. Long tasks come from heavy scripts, big data updates and third-party code such as ads and chat widgets. They are the main cause of poor INP, and they grow on slower phones.

In practice

Filtering 2,000 products takes 70 ms on a laptop and 420 ms with 6× CPU throttling, so typing in search lags.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.