Hacker News new | ask | show | jobs
by acemarke 2690 days ago
Hi, I'm a Redux maintainer.

I wouldn't call it a _significant_ performance hit. There's a measurable difference in our artificial stress tests benchmarks, and some users have reported slowdowns in specific scenarios (especially when large forms are connected to Redux).

I recently posted a roadmap issue with our plans for addressing the perf issues, and moving towards the ability to ship a hooks-based API for React-Redux:

https://github.com/reduxjs/react-redux/issues/1177

I've specifically spent the last week experimenting with reworking the internals of `connect` to come up with an alternative implementation that relies on direct store subscriptions again, and as of a couple days ago, I seem to have come up with something that is actually _faster_ than both v6 _and_ v5 in our benchmarks:

https://github.com/reduxjs/react-redux/issues/1177#issuecomm...

Still needs more investigating and testing, but this approach looks very promising.

1 comments

I'm not sure how you guys qualify "large" forms, but our application is pretty much all inputs (dynamically generated somewhere between 25 and ~300 visible on screen at one time)

We're also investigating hooks, we think we'd get some benefits from not having so many HOCs... specifically as our application is a _large_ form, unmounting components can sometimes be very expensive for us (common example: switching between two React tabs). Excited to see when you guys can release this change since it IS breaking, hopefully a major version change will suffice here :)

If you've got any public examples of apps that are showing perf issues (especially with React-Redux v6), please let me know. Ditto if you can come up with a smaller repo or CodeSandbox that demonstrates the issues.

Our artificial stress test benchmarks are better than nothing, but I really want to get some more "real-world"-type scenarios put together that we can use to compare behavior.