Why do trading dashboards freeze the moment markets get volatile?
I hit this exact wall building a realโtime crypto app with AG Grid โ and the fix came down to one simple rule:
๐ ๐๐ฎ๐๐ฐ๐ต ๐๐ฝ๐ฑ๐ฎ๐๐ฒ๐ ๐ฒ๐๐ฒ๐ฟ๐ ๐ฑ๐ฌ๐บ๐.
๐ง๐ต๐ฒ ๐ฃ๐ฟ๐ผ๐ฏ๐น๐ฒ๐บ
A live order book from the Bitfinex WebSocket API v2 can fire dozens of updates per second during volatility.
If you naรฏvely dispatch every message:
Redux fires constantly
React re-renders constantly
AG Grid tries to reconcile rows constantly
AG Grid is fast โ but not โhundreds of DOM updates per secondโ fast.
The result:
โ frozen UI
โ dropped frames
โ a dashboard that feels like a slideshow
๐ง๐ต๐ฒ ๐ฑ๐ฌ๐บ๐ ๐ฅ๐๐น๐ฒ
Instead of dispatching every update, we buffer them and flush once every 50ms.
Thatโs ~20 updates per second.
Smooth. Stable. Still โrealโtimeโ to the human eye.
ts
let buffer: BookUpdate[] = []
setInterval(() => {
if (buffer.length === 0) return
dispatch(bookBatchUpdateReducer(buffer))
buffer = []
}, 50)
AG Grid now processes one batch per cycle, not fifty individual transactions.
FPS stays high. The UI stays responsive.
๐ช๐ต๐ ๐ฑ๐ฌ๐บ๐?
Human perception of โinstantโ is ~100ms.
At 50ms:
Feels realโtime
Cuts render load by an order of magnitude
Avoids thrashing the grid
Go lower (10ms) โ youโre back to choking the main thread.
Go higher (200ms) โ the order book feels sluggish.
๐ฑ๐ฌ๐บ๐ ๐ถ๐ ๐๐ต๐ฒ ๐๐๐ฒ๐ฒ๐ ๐๐ฝ๐ผ๐.
๐ง๐ต๐ฒ ๐๐ฟ๐ผ๐ฎ๐ฑ๐ฒ๐ฟ ๐๐ฒ๐๐๐ผ๐ป
Highโfrequency data doesnโt care about your render budget.
๐ฌ๐ผ๐ ๐ต๐ฎ๐๐ฒ ๐๐ผ ๐ฒ๐ป๐ณ๐ผ๐ฟ๐ฐ๐ฒ ๐ผ๐ป๐ฒ.
Batching applies to:
live sports feeds
IoT telemetry
logistics tracking
any system where data outpaces UI capacity
AG Grid is powerful, but it still lives on the main thread. Respect that, and your UI will thank you.
Building this in my React 19 + Redux Toolkit crypto project taught me more about browser performance than any tutorial ever could.
What batching strategies have you used in highโfrequency UIs?
Would love to hear your experiences.
๐ช๐ฟ๐ถ๐๐๐ฒ๐ป ๐ฏ๐ ๐ฅ๐ถ๐ฐ๐ฎ๐ฟ๐ฑ๐ผ ๐ฆ๐ฎ๐๐บ๐ฒ๐๐ต
๐ฆ๐ฒ๐ป๐ถ๐ผ๐ฟ ๐๐ฟ๐ผ๐ป๐โ๐๐ป๐ฑ ๐๐ป๐ด๐ถ๐ป๐ฒ๐ฒ๐ฟ | ๐ฅ๐ฒ๐ฎ๐นโ๐ง๐ถ๐บ๐ฒ ๐จ๐ ๐ฆ๐ฝ๐ฒ๐ฐ๐ถ๐ฎ๐น๐ถ๐๐

Top comments (0)