Skip to content
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

redux-optimist dependency causes wasteful mapStateToProps invocations #4593

Closed
aduth opened this issue Jan 19, 2018 · 1 comment
Closed

redux-optimist dependency causes wasteful mapStateToProps invocations #4593

aduth opened this issue Jan 19, 2018 · 1 comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Performance Related to performance efforts

Comments

@aduth
Copy link
Member

aduth commented Jan 19, 2018

This past summer I had reported an issue at ForbesLindesay/redux-optimist#22 . In reviewing the behavior of react-redux recently, I found that it is smart enough to avoid calling each connected components' mapStateToProps if the reference for state does not change after a dispatched action. This should ideally occur if a dispatched action causes no change in state value. However, with redux-optimist, whether or not a change occurs, a new object reference will be returned upon a dispatch, therefore causing mapStateToProps for every single connected component to be invoked.

We should either move away from redux-optimist, or submit an upstream patch, as given the lack of response on ForbesLindesay/redux-optimist#22 since June, it is unlikely to be otherwise resolved.

@aduth aduth added Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Performance Related to performance efforts labels Jan 19, 2018
@aduth
Copy link
Member Author

aduth commented Feb 28, 2018

Pull request with proposed fix submitted at ForbesLindesay/redux-optimist#25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Performance Related to performance efforts
Projects
None yet
Development

No branches or pull requests

1 participant