DEV Community

[Comment from a deleted post]
Collapse
 
dav5595 profile image
David Ebenezer

How would you approach architecting a performance critical react/redux application? Ex: stock trading with multiple updates per second.
Is the immutable data structure that redux enforces still viable in this situation?
How do u make sure that UI is keeping up with the multiple state updates?

Collapse
 
mvoloskov profile image
Miloslav 🏳️‍🌈 🦋 Voloskov

Nice question.

You pretty much can't achieve that kind of performance in immutable data structures without it being persistent. Something like ImmutableJS or MoriJS is absolutely necessary there.

If you don't need the time traveling here, I'd go with something mutable like MobX because it will obviously outperform any persistent stuff you can do in the browser.

Going even bigger, I suggest you choose a really fast backend and calculate everything there so all frontend has to do is just react to WebSocket message and just apply that data as is, without any changes. This is by far the fastest approach I'd personally use solving this task.