4 ms·
I was also in a situation at work where I found that redux did not work great for real-time code. Have you made your solution public? Also related to this art
by colordrops 7y ago
I was also in a situation at work where I found that redux did not work great for real-time code. Have you made your solution public?
Also related to this article, webworkers are great for offloading work from the main thread until you've got high data rates. It doesn't take a lot of data to get to the point where serialization across the worker boundary nullifies the performance gains of moving the work off of the main thread.
- cheez 7y agoNothing is public. Regarding your comment about serialization: that's why I used websockets in the workers. It went pretty well except there was a bug in Chrome where the websocket in the webworker was still subject to the main loop. Something like that. Anyway, the point of offloading everything to webworkers was to make sure that the main thread is free for rendering. So there was very little to serialize, aside from dom differences which are generally not significant.
- colordrops 7y agoHow would websockets reduce serialization overhead (assuming no chrome bug)?
- _bxg1 7y agoSlightly off-topic, but you might look into MobX. It can be more performant than Redux for particularly large component trees because it allows child components to update without going through their parent (and checking all their siblings, for that matter).