PerformanceLongTaskTiming

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The PerformanceLongTaskTiming interface provides information about tasks that occupy the UI thread for 50 milliseconds or more.

Description

Long tasks that block the main thread for 50ms or more cause, among other issues:

  • Delayed Time to interactive (TTI).
  • High/variable input latency.
  • High/variable event handling latency.
  • Janky animations and scrolling.

A long task is any uninterrupted period where the main UI thread is busy for 50ms or longer. Common examples include:

  • Long-running event handlers.
  • Expensive reflows and other re-renders.
  • Work the browser does between different turns of the event loop that exceeds 50 ms.

Long tasks refer to "culprit browsing context container", or "the container" for short, which is the top-level page,