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

Re: [sensors] Call 'onchange' only when data changes and considering frequency hint

From: Mikhail Pozdnyakov via GitHub <sysbot+gh@w3.org>
Date: Fri, 16 Dec 2016 18:07:08 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-267658041-1481911627-sysbot+gh@w3.org>
Sensor polling and sending of 'onchange' event are different things 
(in Chromium even done in different processes): physical sensor is 
polled on platform side  (and timestamp for reading is fetched from 
platform) considering the given frequency hint; updating of reading 
object on JS side and sending of 'onchane' event are synchronized with
 rAF (so can be deferred a bit) so that Critical Rendering Path is not
 interrupted and CPU and battery are not drained.

-- 
GitHub Notification of comment by pozdnyakov
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/152#issuecomment-267658041 using
 your GitHub account
Received on Friday, 16 December 2016 18:07:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:52 UTC