W3C home > Mailing lists > Public > public-device-apis-log@w3.org > March 2017

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

From: Jimmy Huang via GitHub <sysbot+gh@w3.org>
Date: Fri, 17 Mar 2017 18:33:03 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-287436590-1489775582-sysbot+gh@w3.org>
It's not the IPC that's the bottleneck per se, there's ringbuffer that we use that stores the callbacks since the sensor readings are coming in from an interrupt and we have to queue them up so it can be serviced in another context, and if the thread executing the JS application is not able to service them fast enough, the ringbuffer just fills up.  The interrupt can be calling in like 1600Hz, where the JS engine might be only able to service the JS calls at 100Hz, and possibly slower if we are sending it out over BLE, as since each onchange() call, we have no control over how long the app returns control.

-- 
GitHub Notification of comment by jimmy-huang
Please view or discuss this issue at https://github.com/w3c/sensors/issues/152#issuecomment-287436590 using your GitHub account
Received on Friday, 17 March 2017 18:33:09 UTC

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