Bug 1567633 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Test case: Open http://tankanarchy.herokuapp.com/ and choose a user name. Observe WebSocket messages.

The UI freezes for multiple seconds while messages are rendered in chunks.

Bug 1561631 might help with this somewhat, but only if the bottleneck is the amount of elements; which might not be the case.

Profile: https://perfht.ml/2Ybjnwd

- React's `diffProperties$1`  is high, so switching some classes to pure components or using `shouldComponentUpdate` might reduce overhead.
- `setState` takes the biggest chunk of time, so debouncing `onFrameReceived` (maybe using `requestIdleCallback`) might also free some main thread and bundle table updates.
STR:
- Open https://puzzling-rake.glitch.me/ (http://tankanarchy.herokuapp.com/ for a game that sends even more)
- Observe WebSocket messages

AR:
The UI freezes for multiple seconds while messages are rendered in chunks.

Bug 1561631 might help with this somewhat, but only if the bottleneck is the amount of elements; which might not be the case.

Profile: https://perfht.ml/2YgfAh8 (tankanarchy: https://perfht.ml/2Ybjnwd)

- React's `diffProperties$1`  is high, so switching some classes to pure components or using `shouldComponentUpdate` might reduce overhead.
- `setState` takes the biggest chunk of time, so debouncing `onFrameReceived` (maybe using `requestIdleCallback`) might also free some main thread and bundle table updates.

Back to Bug 1567633 Comment 0