-
Notifications
You must be signed in to change notification settings - Fork 81
Description
It seems like the device list just refreshes the connectivity information. Very noticeable when bringing up a lot of devices and watching it live.
I would expect those filters to be live, at least for a foreground tab. This also helps when watching updates happen.
Because we know people will leave a lot of tabs open. We should make a JS hook to integrate with the browser page visibility API (see https://dev.to/vorillaz/how-to-detect-idle-browser-tabs-with-javascript-88n). So only tabs in use actually re-run queries when they get update broadcast messages. We could even unsubscribe/subscribe if we want but I don't think that is necessary. We just want to avoid taxing the database for useless, often duplicate, work.
Essentially, when a device change is reported for the product being watched we re-run the query. It should be debounced to be run at most every 500 ms regardless of number of changes. Essentially debouncing. We should not re-run queries based on update progress reports because those are very frequent.