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

Performance issues when sharing Redux store #1107

Closed
bessey opened this issue Dec 31, 2016 · 3 comments
Closed

Performance issues when sharing Redux store #1107

bessey opened this issue Dec 31, 2016 · 3 comments

Comments

@bessey
Copy link

bessey commented Dec 31, 2016

As observed by myself and wmertens in #apollo-client-core. Every time an action occurs, Apollo spends a significant amount of time performing a deep equals of its state. Mostly quoting wmertens here:

image

In particular, https://github.com/apollostack/apollo-client/blob/ab3d49e7234bf44f9788ef0fd9b5544a2909fa3d/src/ApolloClient.ts#L465 gets executed every time I dispatch any action, and it looks at the active queries and does a deep comparison of their results, which takes 200ms in my case.

Seems to me that at the very least, there should be a test there for the action type, so it only fires on types starting with "APOLLO_"

@bessey
Copy link
Author

bessey commented Dec 31, 2016

Proposed fix found in #1104

@wmertens
Copy link
Contributor

wmertens commented Jan 3, 2017

Note, #1104 is not a fix for the deep comparison.

@calebmer
Copy link
Contributor

This should be fixed by #1136 where a deep equality check is replaced by a referential equality check (===).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants