You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, we upgraded to 3.11 in prod and had to revert since users were hitting extremely slow performance when making large queries. On investigation, users are exceeding the 50,000 cache limit on executeSelectionSet or the 10,000 limit on executeSubSelectedArray.
I believe what you're looking for is this doc: https://www.apollographql.com/docs/react/caching/memory-management. This was something added in 3.9.0. Are you perhaps upgrading from a version before that? I don't believe we've touched these values since we released 3.9.
We also believe that our cache limits were too generous, so we revisited every internal memoization cache, double-checked our key usage, replaced all WeakMaps with a new Weak LRU Cache implementation, and made sure that each cache has a more reasonable maximum size that better represents the results it stores.
While those defaults should be sufficient in 90% of applications, we know that some applications will need to make different trade-offs, so we made each cache size individually configurable. You can read up on all the new configuration options in this new documentation page on memory management.
This is the bit I think it would be useful to clarify, what those previous generous cache limits were. I think they were 2**16 but would be good if you can verify that. Pretty sure it was using the optimism library's built in default.
Hi there, we upgraded to 3.11 in prod and had to revert since users were hitting extremely slow performance when making large queries. On investigation, users are exceeding the 50,000 cache limit on
executeSelectionSet
or the 10,000 limit onexecuteSubSelectedArray
.To fix the issue and reupgrade we're planning to increase the cacheLimit to what it was before 3.11, but can't find this information in the upgrade guide. From https://github.com/benjamn/optimism/blob/main/src/index.ts#L142 and https://github.com/apollographql/apollo-client/pull/8107/files#diff-aba857f65aabe3dce87a57f153d5cc33fe292065af0dcc6c1742b116b226893aR111 we believe it was set to
2**16
previously, but would love it if this can be verified.Thanks so much, and thanks for these new cache configuration parameters, they'll be huge for us.
The text was updated successfully, but these errors were encountered: