Closed nealoke closed 6 years ago
I don't see any reason why redux-batch would have such a perf impact by itself. It doesn't do anything crazy other than a map (or some recursion in case you have arrays within arrays, but that's probably quite rare) :/
If you want to debug this on your side, dispatchRecurse
is the only part of the code with a non-constant complexity. I suggest adding performance.now()
calls here and see what happens.
I think the problem may be the cost of the UI rerender. I used to update a huge table, and in a single rerender, it freezes. Using immutable solves it.
Hi, I've come across an issue in my application where I use this project to batch around 160 actions at once, but for some reason it is causing my UI to freeze as it takes around 1.5s to dispatch it.
Things I checked as best as i can that are not causing the UI freezing:
connect()
method on the componentsrender()
s of all components involvedperformance.now()
and it takes exactly0.0001s
to run it (times 160 is 0.0160s)Pseudo code