Re: [sensors] Don't allocate response objects to avoid triggering GC

> The thread on the chromium list talks about milliseconds.

I never said milliseconds in blink-dev, neither in this thread.

> This assumes that no application-level code interferes with this. Consider the following (inspired by a use case found in a related issue):

This is not a valid example, in the same way developers can populate buffer using `buffer.push({sensor.x; sensor.y; sensor.z});` and then try invalidating it during critical rendering path, e.g., re-layouting.

Based on profiling data for different code paths and initial feedback from developers who are implementing GC in V8 / blink, there is no technical proof that exposing objects instead of primitives would cause "stop-the-world" JS thread stalls because of GC.

Anyways, the change for the interfaces was already done, unfortunately, without any data or even JS example that represents the problem. I think we should avoid that in the future and do proper investigation before rushing to change everything.

-- 
GitHub Notification of comment by alexshalamov
Please view or discuss this issue at https://github.com/w3c/sensors/issues/153#issuecomment-287908878 using your GitHub account

Received on Monday, 20 March 2017 21:48:57 UTC