W3C home > Mailing lists > Public > public-device-apis-log@w3.org > December 2016

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

From: moka via GitHub <sysbot+gh@w3.org>
Date: Tue, 06 Dec 2016 15:35:33 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-265181211-1481038531-sysbot+gh@w3.org>
> Yes, via identifying parameters which are sensor type specific, e.g.
 (completely made-up identifying parameters):

That makes good sense. Providing default behaviour assuming it 
subscribes to "first", and allowing devs to enumerate available 
sensors and choose specific.

> I've punted on dealing with accumulate date for now, tbh. I wan't to
 make sure we don't design something that makes this impossible in the
 future, however, so suggestions are welcome.

Indeed, it can be a tricky one. So for example with Accelerometer, 
current values of acceleration - is what will be available as state, 
but not the deltas. Developer has ability to calculate delta if he 
needs so in event handlers or in fixed update method (sync path).
Which makes sync polling not a need.

GitHub Notification of comment by Maksims
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/153#issuecomment-265181211 using
 your GitHub account
Received on Tuesday, 6 December 2016 15:50:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:34:21 UTC