-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Memory Leak due to readFragment #3132
Labels
📚 good-first-issue
Issues that are suitable for first-time contributors.
Comments
I think #3444 fixed this issue by removing the internal caches in this file. It should be in the next release of apollo-utilities, having been merged to master already. |
Thanks for reminding us about this issue @jakepusateri. Yes, this should now be fixed and will be included in the release of |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Intended outcome:
When using
readFragment
against data that is already in the cache, node's memory usage should remain stable.Actual outcome:
Our node server's memory usage spiked once we started using
readFragment
in a heavily trafficked part of our application:How to reproduce the issue:
I've tracked the issue down to this line:
apollo-client/packages/apollo-utilities/src/transform.ts
Line 184 in 311d205
We are never getting cache hits despite using exactly the same fragment because I believe we are losing our equality reference due to object instantiation here:
apollo-client/packages/apollo-utilities/src/fragments.ts
Line 68 in 311d205
Version
/label memory-leak
The text was updated successfully, but these errors were encountered: