Not so long ago, I started working with react, and I have a performance problem.
I use react + redux + reselect + immutable.js. I have a lot data (like big table with data ~10mb).
My problem is: when I have ~10 000 rows, react creates 10 000 components with: individual connect
, memoize selector
.
1 row consist of ~50 keys (from different stores, for ex: col height, focus index), arrays and etc. For example key title
.
When I modify store, for example change title
in row #123, redux will execute 10 000 memoize selectors
, compare results and it take ~1-2 sec for 10k rows!
How I can prevent connect
calls when I know which component must exactly be re-rendered? Like signal "component with id: row-123
must run memoize selector
and check changes" or any ideas?
I plan to try mobx but I don't actually sure that mobx will prevent unnecessary data comparing for every of 10k component.
P.S. I already thought about pagination, virtual scrolling, but I need to display all the data at the same time into the DOM