A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

[Proposal] performance.memory API

erikchen
2018-04-19

Link to github proposal

Developers currently have no mechanism to obtain the memory usage of their site.

This proposal provides an API with the following properties:

  • Consistent semantics across different OSes and browser vendors
  • No/minimal performance overhead when not used
  • Very fast to compute

This proposal relies on process-specific memory counters. It provides the most utility when the site is being hosted in a process by itself. This is an implementation detail that depends on both the browser vendor and the browsing context [e.g. # of tabs that user has open]. Despite this limitation, the API is still expected to provide utility when collected in aggregate.

jhpratt
2018-04-19

Would this be subject to the same “restriction” as the API for available memory? That is, rounding to the two most significant bits.

vdjeric
2018-04-21

This API would be very useful for engineers at Facebook. We need to understand Facebook.com’s memory usage on real end-user devices and we need to be able to evaluate the effectiveness of our fixes in a reliable way. This API would be a great help.

erikchen
2018-04-23

There will be no rounding.

This seems okay from a privacy perspective since we’re limiting the API to only return non-null numbers when the website is being hosted by itself in a process.

Srem_Portal
2020-04-20

Great answer Vladan.

mkay581
2020-04-21

The original repo looks like its been archived. Where does most updated proposal live?

domenic
2020-04-22

This proposal has morphed in to https://github.com/WICG/performance-measure-memory