L

Long Task

A long task is any piece of JavaScript code that monopolizes the Main Thread for a prolonged period (typically over 50 milliseconds), preventing it from responding to user input. While a long task is running, the browser cannot react to clicks or taps, making the page feel frozen and unresponsive. Long tasks are a primary cause of a poor Interaction to Next Paint (INP) score. The most effective way to optimize them is to break them into a series of smaller tasks, yielding control back to the main thread between each one.

All terms
Fabian Krumbholz
Fabian Krumbholz
April 8, 20261 min read

Related web performance terms

How fast is your website?