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
Instead the code now relies on the servers' values. That ensures we always get accurate values, but obviously doesn't work perfectly if there's latency.
It'd be great to reintroduce the client-side computed values, but that previously meant desynced values and flashing estimates. For example:
Thread count is 7. I add a message. Local estimate turns to 8. Client does a request to get the servers' new estimate.
I add a message. Local estimate turns to 9. Client does another request to get the servers' new estimate.
The servers' first estimate returns. Value is set to 8
The servers' second estimate is returned. Value is set to 9
Result: The user has a thread with 7 messages, adds two, and sees the count fluctuate 7 - 8 - 9 - 8 -9. With more inflight messages, this can become even worse.
One potential solution would be to cancel the inflight requests whenever a new request is sent. Another option would be taking the local estimate when starting a new request, comparing it to the result from the servers' response, and only applying the delta (but that's easy to get an even worse desync with).
The text was updated successfully, but these errors were encountered:
So, matrix-org/matrix-js-sdk#2735 / matrix-org/matrix-react-sdk#9356 stopped using the clients' own local estimations of what event is the latest, whether you contributed yourself and how many replies exist.
Instead the code now relies on the servers' values. That ensures we always get accurate values, but obviously doesn't work perfectly if there's latency.
It'd be great to reintroduce the client-side computed values, but that previously meant desynced values and flashing estimates. For example:
Result: The user has a thread with 7 messages, adds two, and sees the count fluctuate 7 - 8 - 9 - 8 -9. With more inflight messages, this can become even worse.
One potential solution would be to cancel the inflight requests whenever a new request is sent. Another option would be taking the local estimate when starting a new request, comparing it to the result from the servers' response, and only applying the delta (but that's easy to get an even worse desync with).
The text was updated successfully, but these errors were encountered: