-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Compute Pressure API #771
Conversation
The other alternative is https://chromestatus.com/metrics/feature/timeline/popularity/3899 (the constructor) but so far they show the same data. A call to So I would say use the constructor until we see some difference between that and |
https://w3c.github.io/compute-pressure/#supported-sources has both "thermals" and "cpu", but only "cpu" is implemented in Chrome. So we should probably consider just CPU pressure the initial feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paging @ddbeck for an opinion on naming. Go with the spec name or match the API name? We already have intersection observer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into this feature a little more. Especially these docs https://developer.chrome.com/docs/web-platform/compute-pressure and this piece in particular:
In this example the
"cpu"
is the pressure source we are interested in. For now, it is the only
source available. In the future, there may be other sources such as"gpu"
,"power"
or"thermals"
.
I think what we have here is both generic (the compute pressure API in general) and quite specific (observing CPU pressure specifically). It makes naming and describing this thing a pain. I'm going to review with the understanding that we might get this wrong and need to re-name or describe this later, when its in front of web developers.
Co-authored-by: Daniel D. Beck <[email protected]> Co-authored-by: Philip Jägenstedt <[email protected]>
Compat features are tagged in BCD: mdn/browser-compat-data#22687
Not sure if https://chromestatus.com/metrics/feature/timeline/popularity/3900 (PressureObserver_Observe) is the best use counter, cc @kenchris