WICG / netinfo

https://wicg.github.io/netinfo/
Other
95 stars 28 forks source link

Should we recommend thresholds for triggering onchange events? #30

Closed igrigorik closed 7 years ago

igrigorik commented 8 years ago

In the case where we have feedback from the network interface, or some other "network quality estimator" implementation, about performance of the upper bound of the downlink speed... Should we recommend some thresholds for triggering onchange updates?

For example, if we're on a WiFi link and signal quality is continuously changing and thus affects the upper bound, we probably don't want to trigger updates unless we pass some "meaningful" threshold? Knowing that we went from 20Mbps -> 19.9Mbps is arguably not meaningful and may result in a lot of unnecessary events?

Similarly, should these threshold change if and when the page is not visible? We'd have to account for worker contexts here as a separate case, as those are never "visible".

yoavweiss commented 8 years ago

I support such thresholds, for both downlinkMax and the future downlink. I think that they would be more important in an NQE based downlink where the variance is significantly higher, than in downlinkMax, where the values reported from the driver are likely to already be far apart.