-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throttle property updates in UI #1567
Comments
Thanks for bringing up this issue. I suggest we should do some kind of throttling so the UI is only updated every second or so, and perhaps improve the rendering of the UI elements. |
Thx @freaktechnik for reporting this race condition I am able to reproduce this with: So I will slow sensor refresh down from 2Hz to 1Hz I can also explain how to reproduce without sensors. |
Based on RzR's issue I'm not sure this is necessarily primarily about speed. It's more about not changing the state of properties that haven't changed in an update. Which is hard to follow, especially for properties that the user can change. |
well speed has an effect, to avoid events to cross, For the record:
|
Bug: WebThingsIO/gateway#1567 Change-Id: Iaca4775ec97bcc8bcbdcf0ae66fab731cea43784 Signed-off-by: Philippe Coval <[email protected]>
Bug: WebThingsIO/gateway#1567 Change-Id: Iaca4775ec97bcc8bcbdcf0ae66fab731cea43784 Signed-off-by: Philippe Coval <[email protected]>
Bug: WebThingsIO/gateway#1567 Change-Id: Iaca4775ec97bcc8bcbdcf0ae66fab731cea43784 Signed-off-by: Philippe Coval <[email protected]>
Bug: WebThingsIO/gateway#1567 Change-Id: Iaca4775ec97bcc8bcbdcf0ae66fab731cea43784 Signed-off-by: Philippe Coval <[email protected]>
Both my webthing projects have rather high refresh rates on the sensors they expose. That's pretty neat, however the gateway UI has trouble dealing with that. It appears that it tries to re-print all the values every time a single value changes. This leads to it being nearly impossible to change a property from the gateway. It also leads to flicker of the actual property values on the client side, since they are cleared constantly, as the value updates aren't batched in the WoT implementation (and probably the protocol?).
To get reliable operation I have to slow the updates to every couple seconds, depending on the amount of properties that get constant updates. Of course it doesn't make much sense to have a property update every 100ms for binary values, however even a refresh rate of 1 second with 12 properties that are refreshed every second leads to severe flickering, since the properties are updated one after another.
My expectation would be that any property that's not being updated isn't touched and that I can reliably change property values from the gateway while other properties are updating.
The text was updated successfully, but these errors were encountered: