- From: Tobie Langel via GitHub <sysbot+gh@w3.org>
- Date: Fri, 08 May 2015 21:13:09 +0000
- To: public-device-apis@w3.org
My understanding from https://github.com/w3c/sensors/issues/9#issuecomment-63326257 is that a batch mode is necessary for performance reasons (due to the cost of re-entering the JS context every time the sensor emits a value). This implies that the batching is done in native code and then transferred to the JS context all at once. Now whether that batched data is then emitted all together in a single `ondata` event (e.g. `sensor.emit("data", batch);`) or separately in _n_ different events (e.g. `batch.forEach(value => sensor.emit("data", value));`) can be debated, though there might also be performance considerations there. -- GitHub Notif of comment by tobie See https://github.com/w3c/sensors/issues/13#issuecomment-100370181
Received on Friday, 8 May 2015 21:13:10 UTC