excalidraw / excalidraw

Virtual whiteboard for sketching hand-drawn like diagrams
https://excalidraw.com
MIT License
83.09k stars 7.81k forks source link

Introducing Backpressure mechanism for live collaboration #3216

Open vjeux opened 3 years ago

vjeux commented 3 years ago

On underpowered device, it's easy to come into a situation where updates are backing up and it's rendering updates from a few seconds ago makes for a really bad experience. Instead what we should do is to start dropping updates if we are getting backed up so that we render frames not too far away from the current one to avoid introducing massive lag.

vjeux commented 3 years ago

cc @petehunt as it's in your alley.

tomayac commented 3 years ago

WebSocketStream might come in handy here, since it comes with back pressure support.

blairmacintyre commented 3 years ago

I'm seeing massive lag on even high-end devices during collaboration right now. Desktop mac, PC, iPhone, and iPad.