Intent to Experiment: Unrestricted access to performance.measureUserAgentSpecificMemory()

131 views
Skip to first unread message

Michael Lippautz

unread,
Oct 13, 2023, 4:43:01 AM10/13/23
to blink-dev, va...@chromium.org

Contact emails

va...@chromium.org, mlip...@chromium.org


Explainer

https://github.com/WICG/performance-measure-memory


Specification

https://github.com/WICG/performance-measure-memory


Design docs


Original docs:

https://web.dev/monitor-total-page-memory-usage

https://github.com/WICG/performance-measure-memory/blob/master/ORIGIN_TRIAL.md


Summary


performance.measureUserAgentSpecificMemory() is specified to only be available in cross-origin isolated environments (behind COOP/COEP).


This is a request for removing the COOP/COEP restriction for a limited amount of time from M120 to M121. This is to allow partners that adopted WasmGC on WebWorkers to perform regression tests in the wild as well as measure their impact. These partners are not fully ready to deploy COOP/COEP.


Note that performance.memory (legacy API) cannot be used for this purpose as it was never enabled on workers.


The timeline has been adjusted to match the OT for SharedArrayBuffer on non-isolated pages. 


Blink component

Blink>PerformanceAPIs


Search tags

JavaScript memory, crossOriginIsolated, performance.measureMemory()


TAG review

-


TAG review status

-


Chromium Trial Name

MeasureMemory


Link to origin trial feedback summary

-


Origin Trial documentation link

-


Risks


This area is unchanged from the original launch.


Interoperability and Compatibility

The actual memory usage of a web page is not comparable across browsers. The granularity of memory usage breakdown will differ across browsers.



Gecko: Under consideration (https://github.com/mozilla/standards-positions/issues/281)


WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2020-April/031160.html)


Web developers: Positive (https://docs.google.com/document/d/1u21oa3-R1FhHgrPsh8-mpb8dIFVj60wcFiM5FFrfIQA/edit#heading=h.6si74uwp7sq8) Developers from Gmail, Google Docs/Slides/Sheet, Facebook, YouTube contributed use cases for a memory measurement API. The proposal was presented at WebPerf WG F2F June 2019 meeting with positive feedback from developers.


Other signals:


Ergonomics

None



Activation

None



Security

The API relies on COOP and COEP for security. See https://github.com/ulan/performance-measure-memory#security-considerations


This is the restriction that is supposed to be temporarily lifted.


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Goals for experimentation


Allow partners to perform A/B testing when deploying relatively heavy applications on web workers.


Ongoing technical constraints

-


Debuggability

-


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No (unchanged)


Is this feature fully tested by web-platform-tests?

Yes


Flag name on chrome://flags



Finch feature name

None


Non-finch justification

None


Requires code in //chrome?

False


Tracking bug

Bug for OT: https://bugs.chromium.org/p/chromium/issues/detail?id=1486857

https://bugs.chromium.org/p/chromium/issues/detail?id=1049093


Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1048745


Estimated milestones

Shipping on desktop

89

OriginTrial desktop first

120


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5685965186138112


Links to previous Intent discussions

Intent to Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/zxCKzulX424/m/bb1QR23rAQAJ



This intent message was generated by Chrome Platform Status.


Yoav Weiss

unread,
Oct 13, 2023, 4:52:26 AM10/13/23
to Michael Lippautz, blink-dev, va...@chromium.org
This is exciting! Thanks for working on this!!

On Fri, Oct 13, 2023 at 10:42 AM Michael Lippautz <mlip...@chromium.org> wrote:

Contact emails

va...@chromium.org, mlip...@chromium.org


Explainer

https://github.com/WICG/performance-measure-memory


Specification

https://github.com/WICG/performance-measure-memory


Design docs


Original docs:

https://web.dev/monitor-total-page-memory-usage

https://github.com/WICG/performance-measure-memory/blob/master/ORIGIN_TRIAL.md


Summary


performance.measureUserAgentSpecificMemory() is specified to only be available in cross-origin isolated environments (behind COOP/COEP).


This is a request for removing the COOP/COEP restriction for a limited amount of time from M120 to M121. This is to allow partners that adopted WasmGC on WebWorkers to perform regression tests in the wild as well as measure their impact. These partners are not fully ready to deploy COOP/COEP.


Do you want to experiment with removing the API's restrictions generally or to sites that opt-in to this? (Through an OT flag, I'm assuming) 

Note that performance.memory (legacy API) cannot be used for this purpose as it was never enabled on workers.


The timeline has been adjusted to match the OT for SharedArrayBuffer on non-isolated pages. 


IIUC the restrictions on measureUASpecificMemory and SharedArrayBuffer are similar but for different reasons. Would we have a separate OT token for this?
I think we want a new chrome status entry for this, in order for this to make it into the right dashboards for approvals. (e.g. the security and privacy ones seem relevant here)
 

Links to previous Intent discussions

Intent to Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/zxCKzulX424/m/bb1QR23rAQAJ



This intent message was generated by Chrome Platform Status.


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAH%2BmL5CWW3BoKqN2%3DvxwZYAD9JzJdwCoYUwHDA8Hay_AhfqXPA%40mail.gmail.com.

Michael Lippautz

unread,
Oct 13, 2023, 9:59:37 AM10/13/23
to Yoav Weiss, Michael Lippautz, blink-dev, va...@chromium.org
Thanks!

On Fri, Oct 13, 2023 at 10:52 AM Yoav Weiss <yoav...@chromium.org> wrote:
This is exciting! Thanks for working on this!!

On Fri, Oct 13, 2023 at 10:42 AM Michael Lippautz <mlip...@chromium.org> wrote:

Contact emails

va...@chromium.org, mlip...@chromium.org


Explainer

https://github.com/WICG/performance-measure-memory


Specification

https://github.com/WICG/performance-measure-memory


Design docs


Original docs:

https://web.dev/monitor-total-page-memory-usage

https://github.com/WICG/performance-measure-memory/blob/master/ORIGIN_TRIAL.md


Summary


performance.measureUserAgentSpecificMemory() is specified to only be available in cross-origin isolated environments (behind COOP/COEP).


This is a request for removing the COOP/COEP restriction for a limited amount of time from M120 to M121. This is to allow partners that adopted WasmGC on WebWorkers to perform regression tests in the wild as well as measure their impact. These partners are not fully ready to deploy COOP/COEP.


Do you want to experiment with removing the API's restrictions generally or to sites that opt-in to this? (Through an OT flag, I'm assuming) 

We don't want this generally but through an OT for a limited time.
 

Note that performance.memory (legacy API) cannot be used for this purpose as it was never enabled on workers.


The timeline has been adjusted to match the OT for SharedArrayBuffer on non-isolated pages. 


IIUC the restrictions on measureUASpecificMemory and SharedArrayBuffer are similar but for different reasons. Would we have a separate OT token for this?

We would want a separate OT token.  We already reached out to a few security folks which would want us to align the times and make it as short as possible (for good reasons). The unrestricted SAB OT also has issues with privacy which is why we should align the OT times.
Yeah, sorry for the confusion as I was not really sure how to file this and follow the proper process. So, I guess I start a "new feature" that's just temporarily available through an OT?

Tom Jones

unread,
Oct 13, 2023, 1:27:07 PM10/13/23
to Michael Lippautz, blink-dev, va...@chromium.org
I would add one other risk.

Side channel attacks against security processes like encryption.

..tomj

thx ..Tom (mobile)

Michael Lippautz

unread,
Oct 16, 2023, 8:25:00 AM10/16/23
to Michael Lippautz, Yoav Weiss, blink-dev, va...@chromium.org

Yoav Weiss

unread,
Oct 17, 2023, 7:34:44 AM10/17/23
to blink-dev, Michael Lippautz, Yoav Weiss, blink-dev, Lutz Vahl
LGTM to experiment M120 to M121

Yoav Weiss

unread,
Oct 17, 2023, 7:35:45 AM10/17/23
to blink-dev, Yoav Weiss, Michael Lippautz, blink-dev, Lutz Vahl
Oops! Can you start the reviews for privacy, security and debuggability in the new status entry? 

Lutz Vahl

unread,
Oct 17, 2023, 10:45:14 AM10/17/23
to Yoav Weiss, blink-dev, Michael Lippautz
I've adjusted the stage to 'Origin Trial' and added the OT milestones. Does this trigger the relevant reviews?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Yoav Weiss

unread,
Oct 17, 2023, 11:44:19 AM10/17/23
to Lutz Vahl, Jason Robbins, blink-dev, Michael Lippautz
On Tue, Oct 17, 2023 at 4:45 PM Lutz Vahl <va...@chromium.org> wrote:
I've adjusted the stage to 'Origin Trial' and added the OT milestones. Does this trigger the relevant reviews?

It does not.. +Jason Robbins - can you assist?

Lutz Vahl

unread,
Oct 17, 2023, 12:43:37 PM10/17/23
to Yoav Weiss, Jason Robbins, blink-dev, Michael Lippautz
Clarified with Jason offline. Thanks again!
Reviews are triggered now. PTAL.

Yoav Weiss

unread,
Oct 18, 2023, 3:17:33 AM10/18/23
to Lutz Vahl, Jason Robbins, blink-dev, Michael Lippautz
Great! My LGTM stands, but please wait for the relevant reviews to complete before starting the experiment.
Reply all
Reply to author
Forward
0 new messages