1 document tagged with “Long Tasks”

Back to all tags.

A long task is a piece of JavaScript that runs on the main thread for longer than 50 ms and blocks everything else for that time. The user clicks, but the page does not respond. INP shoots up, Lighthouse flags it in the report.

Under the long tasks tag you will find articles on finding them in devtools, which techniques help (yield, scheduler.postTask, debouncing), and when it makes sense to refactor a larger piece of code.