-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix performance createListenerCollection #1450
fix performance createListenerCollection #1450
Conversation
Deploy preview for react-redux-docs ready! Built with commit 58a4b27 |
Can you provide some numbers on how this performs better? |
I added screenshots to make it clear. |
OK, I cleaned things up a bit. We used the previous current/next form copied from Redux core because we wanted to ensure adding a subscriber while dispatching wouldn't trigger an edge case. However, since this code is nested inside of Subscription anyways, we actually don't need these guarantees. Thanks for the PR! |
I'm sorry, I made a mistake. This PR must be revert. Because it led to the wrong order of calling parent/child selectors.😟 |
This reverts commit 476c0de.
* fix performance createListenerCollection * fix get for test * small fix * Simplify, pretty up, and remove vars
…uxjs#1452) This reverts commit 476c0de.
createListenerCollection has a bad performance for more listeners.
In my implementation, performance is much better
before:
after: