jargon

Frontend & browser·Performance and Core Web Vitals

one function held the main thread for 300 milliseconds and every click during it queued up behind it.

Long task

Also calledlong-running task

Any task occupying the main thread for more than fifty milliseconds, during which the browser cannot respond to input or paint. It is the atomic unit of unresponsiveness: interaction latency is almost always a queue behind one of these. Breaking one up means yielding to the event loop between chunks, which is what `scheduler.yield` and the older `setTimeout` trick both do.

Commonly confused with