← Back to release summary

Buffered flag for long tasks

Category
Performance
Type
New or changed feature
Status
Enabled by default (Chrome 81)
Intent stage
Evaluate readiness to ship

Summary

This feature tracks https://www.chromestatus.com/feature/5118272741572608 for the case of PerformanceLongTask entries

Motivation

We initially shipped the PerformanceObserverInit buffered flag without longtasks because PerformanceLongTaskTiming entries are not currently being created if there is no PerformanceObserver observing them. There is no need for these entries without the buffered flag because there is no PerformanceTimeline support for longtasks: they cannot be queried via performance.getEntries(). Nonetheless, Blink’s PerformanceMonitor already receives task durations, so creating these entries would be pretty trivial. Buffering these entries is useful because many longtasks occur early during page load. Without the buffered flag, a developer cannot gain insight into very early long tasks and is incentivized to run a script registering a PerformanceObserver early on.

Standards & signals

Docs: n/a

Explainers: https://github.com/w3c/performance-timeline/#buffered-flag

View on chromestatus.com