Redux Performance With Large Objects
I am using Redux and React to build a web application. My application is an analytics application that renders a lot of data. I am running into performance issues when my store bec
Solution 1:
Simply "saving values into the store" will not affect speed whatsoever. It's how you process those values in your reducers, and use them in your UI that matter. So, it's a bit hard to give specific advice, since you haven't given any info on how you're actually using that data.
In general, per the other comment, use of memoized selectors (created by the Reselect library) is helpful for only recalculating expensive derived values when the inputs actually change.
For more information on improving Redux usage performance, please see:
- The Redux FAQ entry on scaling and performance
- The Redux Performance section of my React/Redux links list
- My blog post Practical Redux, Part 6: Connected Lists, Forms, and Performance
Solution 2:
Try Reselect. Do the result object reference change after each calculation? If that's the case, this small library should help you.
Post a Comment for "Redux Performance With Large Objects"