[BUG] Sync performance issues
Closed this issue · 2 comments
Bug Description
Various performance issues appear to stem from the websocket implementation. This is observed through users getting 'out of sync' during a collaborative session and loading hangs that network utilization points to websocket actions.
To Reproduce
Steps to reproduce the behavior:
- load a complicated room, such as a custom .ggb file with colored cuisenaire rods
- Note loading hangs in network
- Websocket actions result in long loading times
/ alternate
- load a complicated room and begin a collaborative session
- increase room complexity with collaborative actions adding to the room and tabs
- Note that 'in-control' user actions eventually are not automatically reflected on the passive client side
Expected behavior
Custom rooms/files and collaborative sessions should be able to load and work seamlessly, keeping the user in real-time sync with the VMT environment
Screenshots
( to be added )
Additional context (Environment)
On-going issue, more observation is needed
A variety of updates have been implemented to address the underlying issues related to room sync and connectivity issues:
- updated main socket.io package
- display a status to the user based upon the socket ping latency
- better handling of socket disconnects, including specifying a disconnection from a user leaving
- optioning a hard refresh for the user if a lack of connection is detected
- specific activity workspace edits to improve user experience, especially across multiple tabs
Recent updates have partially or mostly addressed these issues. Biggest issue was poor cleanup of listeners, causing performance issues.
However, it is recommended to devise a way to 'check' and silently resync the mathspace if the user misses an event/falls out of sync with the current live session.
Additionally, sync issues may be exacerbated by rooms having multiple tabs.