Re: [w3ctag/design-reviews] JavaScript Memory API (#386)

Thanks a lot for taking a look!

I will make sure to emphasize in the text and examples that the results vary across browsers and that the function can throw.

The performance of the API depends on how a browser organizes JavaScript heaps. If a browser separates heaps by origin, then the API will be cheap. Otherwise, the browser has to do additional work to compute the memory usage. In any case, this is the cheapest memory measurement API we can get given the security constraint of not leaking information between origins. (That's the fundamental trade-off between performance and security).

Thanks for the suggestion about scoped memory metrics. I think they are solving much harder problem than this API does. They may be too expensive because they may require forcing garbage collection to be useful. Since the feasibility is not clear, I want to first focus on shipping the minimal API and consider scoped API as the next step.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/386#issuecomment-517268296

Received on Thursday, 1 August 2019 12:37:56 UTC