You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think implementation-defined bucket values is probably right (there's likely no good way to formally define a precise specific). That said, I also imagine that rough interoperability for them will prove to be important. As soon as websites start altering the experience based on the performance bucket, it will become important to site developers that they get a broadly similar experience across browsers on similar devices. And then it will become important to device makers to try to predict what performance class they will get assigned for new devices to maximize the user experience.
This is perhaps similar to the debate we're currently having of interoperability of on-device AI APIs which are inherently probabilistic. I think we're converging on the use of industry benchmarks as a helpful but not overly constraining tool. I'd suggest something similar here. Maybe we should publish a sample site that computes some value based on signals our implementation uses? Or perhaps we should publish a database of popular devices and their value (all non-normative of course)?
One other tool which may help is for Chromium to have a user setting for overriding the predicted value, similar to how most games allow the user to choose a higher-than-recommended graphics quality setting for their device (trading eg. resolution for framerate). Knowing the user can alter the value may also help with the privacy debate.
I like the idea of a game-like override UI. In the presence of features gated on the performance tier, it becomes handy for example if the built-in prediction algorithm mispredicts.
I've generated a JS reference impl from the chromium impl in #12, perhaps having some version of that in this repo would help address this issue?
Or perhaps we want to go even further and have the spec define the simple core -> tier mapping normatively (#13), then non-normatively point to the reference implementation for those who want to match the chromium implementation exactly?
One note in case it's not clear: while working to ensure interoperability we must keep the precise algorithm very cheap to update. The algorithm is an imperfect heuristic and necessarily needs to change over time - both to improve it and to adapt to changes in the CPU market. If we impose some non-trivial burden on updates then it will be hard to keep the chromium implementation from diverging from the spec in practice (especially since it's not really practical to have an automated conformance test suite). This was the idea behind keeping the details entirely implementation defined in the first place. Personally I believe there are a variety of pragmatic middle grounds here that can work well in practice.
Or perhaps we want to go even further and have the spec define the simple core -> tier mapping normatively (#13), then non-normatively point to the reference implementation for those who want to match the chromium implementation exactly?
Yep, this is personally what I'd shoot for. If we need to back it out and make it more implementation-defined and hand-wavy, we always can, but this way we jump to a point of better determinism and interoperability, and then we can debate any future changes to the algorithm from there. I've always been a little concerned about the implementation-defined aspect otherwise, as I imagine JS would rely on browser sniffing to understand what "2" means in Safari vs. Chrome.
we must keep the precise algorithm very cheap to update. The algorithm is an imperfect heuristic and necessarily needs to change over time - both to improve it and to adapt to changes in the CPU market.
I strongly agree with this! @RByers I'm curious what you think, but I feel like we kinda get this by default, right? Assuming we "freeze" all pre-existing mappings (i.e., CPUXyz always maps to 2 and never changes), then we basically have an append-only model, in which the only changes made are new families of CPUs getting their first-time mappings spec'd and implemented. Does that policy sound right and light-weight enough to you?
I strongly agree with this! @RByers I'm curious what you think, but I feel like we kinda get this by default, right? Assuming we "freeze" all pre-existing mappings (i.e., CPUXyz always maps to 2 and never changes), then we basically have an append-only model, in which the only changes made are new families of CPUs getting their first-time mappings spec'd and implemented. Does that policy sound right and light-weight enough to you?
Do we need to freeze pre-existing mappings? Might we not want to fix bugs or otherwise improve reliability?
To me the main question around velocity is more one of standards governance. Eg. if this incubation eventually graduates into a WHATWG spec, then would every tweak need support from two implementations to land? I think that would probably be unacceptable. Instead I think we'd need some mechanism more like we have in the WPT project where any one implementation can unilaterally land any heuristics change they think is good, and only if someone presents evidence that it's a bad change should it be backed out and subject to a consensus process. To me, it's the fear of getting stuck in some high cost iteration process which would motivate wanting to keep all this as implementation details out of the spec.
Do we need to freeze pre-existing mappings? Might we not want to fix bugs or otherwise improve reliability?
I'm mostly just citing our principle to not re-shuffle existing buckets, but yeah I agree that shouldn't stop us from fixing/tweaking heuristics. It's more about "all CPUs that turn up 3 shouldn't simultaneously turn up 2 in a few years when next generation hardware is announced".
Eg. if this incubation eventually graduates into a WHATWG spec, then would every tweak need support from two implementations to land? I think that would probably be unacceptable.
I personally don't see why that's a problem, if that leads to interoperability. That's how normal spec bugs work, right? We find one, we make sure implementations agree, and update the spec. I can kind of see how these changes differ from "normal" API changes, but it takes some squinting. I'm fine either way though.
WPT project where any one implementation can unilaterally land any heuristics change they think is good, and only if someone presents evidence that it's a bad change should it be backed out and subject to a consensus process.
How would we measure changes to heuristics in this venue if there is no centrally agreed-upon listing of them? For example, if Chrome tweaks a heuristic, through what mechanism would another vendor report an issue, and what consensus would there need to be on the fall-out, if it's not specified here?
As an alternative to Rick's partial algorithm (#13), I have uploaded PR #19 which includes the full algorithm from the reference implementation (and Chromium's actual implementation) as a normative part of the spec, at some higher-level of abstraction.
So, regarding this concern, there are currently three options:
Keep the spec as-is: totally implementation defined;
Activity
handellm commentedon Oct 10, 2025
I like the idea of a game-like override UI. In the presence of features gated on the performance tier, it becomes handy for example if the built-in prediction algorithm mispredicts.
RByers commentedon Jun 20, 2026
I've generated a JS reference impl from the chromium impl in #12, perhaps having some version of that in this repo would help address this issue?
Or perhaps we want to go even further and have the spec define the simple core -> tier mapping normatively (#13), then non-normatively point to the reference implementation for those who want to match the chromium implementation exactly?
@domfarolino WDYT?
RByers commentedon Jun 23, 2026
One note in case it's not clear: while working to ensure interoperability we must keep the precise algorithm very cheap to update. The algorithm is an imperfect heuristic and necessarily needs to change over time - both to improve it and to adapt to changes in the CPU market. If we impose some non-trivial burden on updates then it will be hard to keep the chromium implementation from diverging from the spec in practice (especially since it's not really practical to have an automated conformance test suite). This was the idea behind keeping the details entirely implementation defined in the first place. Personally I believe there are a variety of pragmatic middle grounds here that can work well in practice.
domfarolino commentedon Jul 15, 2026
Yep, this is personally what I'd shoot for. If we need to back it out and make it more implementation-defined and hand-wavy, we always can, but this way we jump to a point of better determinism and interoperability, and then we can debate any future changes to the algorithm from there. I've always been a little concerned about the implementation-defined aspect otherwise, as I imagine JS would rely on browser sniffing to understand what "2" means in Safari vs. Chrome.
I strongly agree with this! @RByers I'm curious what you think, but I feel like we kinda get this by default, right? Assuming we "freeze" all pre-existing mappings (i.e., CPUXyz always maps to
2and never changes), then we basically have an append-only model, in which the only changes made are new families of CPUs getting their first-time mappings spec'd and implemented. Does that policy sound right and light-weight enough to you?RByers commentedon Jul 21, 2026
Do we need to freeze pre-existing mappings? Might we not want to fix bugs or otherwise improve reliability?
To me the main question around velocity is more one of standards governance. Eg. if this incubation eventually graduates into a WHATWG spec, then would every tweak need support from two implementations to land? I think that would probably be unacceptable. Instead I think we'd need some mechanism more like we have in the WPT project where any one implementation can unilaterally land any heuristics change they think is good, and only if someone presents evidence that it's a bad change should it be backed out and subject to a consensus process. To me, it's the fear of getting stuck in some high cost iteration process which would motivate wanting to keep all this as implementation details out of the spec.
domfarolino commentedon Jul 21, 2026
I'm mostly just citing our principle to not re-shuffle existing buckets, but yeah I agree that shouldn't stop us from fixing/tweaking heuristics. It's more about "all CPUs that turn up 3 shouldn't simultaneously turn up 2 in a few years when next generation hardware is announced".
I personally don't see why that's a problem, if that leads to interoperability. That's how normal spec bugs work, right? We find one, we make sure implementations agree, and update the spec. I can kind of see how these changes differ from "normal" API changes, but it takes some squinting. I'm fine either way though.
How would we measure changes to heuristics in this venue if there is no centrally agreed-upon listing of them? For example, if Chrome tweaks a heuristic, through what mechanism would another vendor report an issue, and what consensus would there need to be on the fall-out, if it's not specified here?
nickie commentedon Jul 21, 2026
As an alternative to Rick's partial algorithm (#13), I have uploaded PR #19 which includes the full algorithm from the reference implementation (and Chromium's actual implementation) as a normative part of the spec, at some higher-level of abstraction.
So, regarding this concern, there are currently three options:
RByers commentedon Jul 22, 2026
FWIW I don't have a strong opinion on which solution we take, either 2 or 3 seems great to me.