Re: [sensors] Should the API allow setting both samplingFrequency and reportingFrequency?

@rwaldron: Having clear terminology that everyone agrees on to refer to both reporting and sampling frequency is already a great step forward. This wasn't the case until now.

@alexshalamov, @rwaldron: If we were not to provide a way for web developers to set the sampling frequency, am I correct in assuming that this would be decided by the UA based on reporting frequency and a possible latency flag?

So for example, let's say the Web developers requested the following:

```js
{ frequency: 100, latency: "normal" }
```

Is it fair to assume from this that both the reporting and sampling frequencies would be around 100 Hz?

Similarly, if the Web developer now chose:

```js
{ frequency: 1000, latency: "lowest" }
```

_(Before you start saying that this is something ridiculous for developers to do, please bear with me, that's precisely the point: they will do this. Remember the [`translateZ(0)` and other hacks](https://stackoverflow.com/questions/10814178/css-performance-relative-to-translatez0) to force elements onto the GPU?)_

What would the sampling frequency be? Wouldn't that effectively hit the HW limits of the underlying system on a number of devices and put us in a similar solution as if the developer had required a sampling frequency above the supported one? What's the plan in such cases? To deliver 1000 events per second even if we don't have new data? To cap the reporting frequency at the maximum sampling frequency supported by the underlying system? To arbitrarily limit reporting frequency for the lowest common denominator?

Finally, imagine we do end up with a `rAF` sync mode, how will we interpret things like this:

```js
{ frequency: 240, latency: "lowest", rAFSync: true }
```
Ignore `frequency` altogether in a window, ignore `rAFSync` in a worker? 

And now what about:

```js
{ frequency: 240, rAFSync: true }
```

Would frequency be ignored altogether or would it be used to inform the latency?


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

Received on Friday, 2 June 2017 06:52:03 UTC