Skip to content

Always deep freeze results from apollo #1296

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

Closed
wants to merge 1 commit into from

Conversation

cotillion
Copy link
Contributor

@cotillion cotillion commented Dec 2, 2021

I noticed the production app was using twice as much memory as the development builds.
It seems this is the reason. In development builds apollo deep freezes the results.
Reactivity on the apollo results does not make sense since apollo notifies us on changes.

This fixed it for me but I'm not sure if there are any browser compat issues with using Set.
Something similar should probably be done for v4.

apollo-client only deep freezes results in development builds.
For Vue this meant that the the entire result was reactive in
production but not in the development leading to higher memory
usage and worse performance in production.
@cotillion cotillion closed this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant