Skip to content

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Oct 8, 2025

This CL adds a prototype implementation for a new Web API that exposes
some information about how powerful the user device is, targeting
applications that will use this information to provide an improved
user experience. It is currently implemented behind the runtime flag
--enable-features=CpuPerformance.

The API exposes navigator.cpuPerformance, which is a small integer
number corresponding to the user device's "performance tier" (similarly
to navigator.deviceMemory). The prototype implementation simply
classifies user devices in five tiers (1-4, denoting increasing
performance; 0 for unknown), based on the number of CPU cores.
The plan is to allow embedders to override this default with more
complicated, implementation-specific behaviour (to be implemented
in a subsequent CL).

Chrome Status entry: https://chromestatus.com/feature/5189864286978048
Explainer: https://github.com/explainers-by-googlers/cpu-performance

Change-Id: Ie711d0de89c44ee621c72271f5a98a0a32d64365
Bug: 449760252
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6780564
Commit-Queue: Nikolaos Papaspyrou <[email protected]>
Reviewed-by: Dominic Farolino <[email protected]>
Reviewed-by: Michael Lippautz <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1527714}

This CL adds a prototype implementation for a new Web API that exposes
some information about how powerful the user device is, targeting
applications that will use this information to provide an improved
user experience. It is currently implemented behind the runtime flag
--enable-features=CpuPerformance.

The API exposes navigator.cpuPerformance, which is a small integer
number corresponding to the user device's "performance tier" (similarly
to navigator.deviceMemory). The prototype implementation simply
classifies user devices in five tiers (1-4, denoting increasing
performance; 0 for unknown), based on the number of CPU cores.
The plan is to allow embedders to override this default with more
complicated, implementation-specific behaviour (to be implemented
in a subsequent CL).

Chrome Status entry: https://chromestatus.com/feature/5189864286978048
Explainer: https://github.com/explainers-by-googlers/cpu-performance

Change-Id: Ie711d0de89c44ee621c72271f5a98a0a32d64365
Bug: 449760252
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6780564
Commit-Queue: Nikolaos Papaspyrou <[email protected]>
Reviewed-by: Dominic Farolino <[email protected]>
Reviewed-by: Michael Lippautz <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1527714}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 6cdc155 into master Oct 9, 2025
15 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-6780564 branch October 9, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants