← Back to release summary

JS Self-Profiling API

Category
Performance
Type
New or changed feature
Status
Enabled by default (Chrome 94)
Intent stage
Shipped

Summary

Adds a web-exposed sampling profiler for measuring client JavaScript execution time. Gathering JS profiles from real users can help developers debug slow observed performance without the need for invasive manual instrumentation.

Motivation

Currently, it is difficult for web developers to understand how their applications perform in the wide variety of conditions encountered on real user devices. A native self-profiling API for JS code would also allow web developers to efficiently find hotspots in their JS code during page loads and user interactions, to assign CPU budgets to individual JS-implemented features on the page, to find unnecessary work being done on the client, and to find low-priority JS code executing in the background and wasting device power.

Standards & signals

Docs: https://docs.google.com/document/d/1NGrU6xVWHq8uLfSFRfDWh1v_UiXLiOgr2FDb2KIaoL0/edit?usp=sharing https://docs.google.com/document/d/1OTwlBnAMXZEaOICtuz16c01QnkPPdqHBoHpfGwnk5SY/edit?usp=sharing

Samples: https://wicg.github.io/js-self-profiling/#examples

Explainers: https://www.github.com/WICG/js-self-profiling

View on chromestatus.com