The Compute Pressure API offers high-level states that represent the pressure on the system. It allows the implementation to use the right underlying hardware metrics to ensure that users can take advantage of all the processing power available to them as long as the system is not under unmanageable stress. “Pressure” is a generic term by design – at the moment it is calculated based on CPU load, but future plans include using signals from temperature and battery status, for example.
To provide a delightful user experience, modern compute-intensive web applications and websites must be able to carefully utilize the underlying system without exhausting its computing resources. To date, this has only been possible by relying on side effects such as dropped frames observed after the fact, when the user experience had already been compromized. The Compute Pressure API exposes a minimum set of high-level states that provide a web developer-friendly abstraction that allows web applications to make informed and impactful resource usage decisions ahead of time. For example, by using this API, a video conferencing web application can render video effects with a varying degree of sophistication depending on the availability of the system's computing resources, and adapt to the changes ahead of time maintaining a cohesive user experience. Note: This is the second version of the Compute Pressure API driven by real-world use cases with a privacy and security focus. Origin Trial feedback from the now obsoleted experimental first version was considered in this redesign.
Docs: https://developer.chrome.com/docs/web-platform/compute-pressure
Samples: https://w3c.github.io/compute-pressure/demo
Explainers: https://github.com/w3c/compute-pressure/blob/main/README.md