You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
We are setting timeouts (usually 20 seconds) in various components to re-check for things like:
latest transactions
account balance
delegates
votes
Expected behaviour
As @alihaghighatkhah pointed out, we should be using window.requestAnimationFrame() because it triggers only when the window is visible, so it can save a lot of traffic.
Although, we must implement a function that determines whether it makes sense to repeat a particular request. It would be nice if it could somehow synchronise with block time so that it knows that a new block has been forged and thus there can potentially be some changes.
Actual behaviour
We are setting timeouts (usually 20 seconds) in various components to re-check for things like:
Expected behaviour
As @alihaghighatkhah pointed out, we should be using
window.requestAnimationFrame()
because it triggers only when the window is visible, so it can save a lot of traffic.Although, we must implement a function that determines whether it makes sense to repeat a particular request. It would be nice if it could somehow synchronise with block time so that it knows that a new block has been forged and thus there can potentially be some changes.
Maybe we can use this angular wrapper:
https://www.npmjs.com/package/angular-raf
The text was updated successfully, but these errors were encountered: