Hi all, we have a react web app and its performance is degrading quite a bit, im trying to debug and understand why. The issue seems to be related to how many components are listing for cache updates of a query.
I know there is a lot of variables here, but whats the best way to find out more and get to the bottom of my issue. Our app seems to almost freeze once our main query is returned.
Our cache inMemoryCache.maybeBroadcastWatch is getting over 12k value. Is this normal amount and would it be hurting performance?
That limit is adjustable and that should help you tremendously. That memoization cache in particular can cause quite a dramatic slowdown when full. Please see the linked doc from that tab in devtools on Memory Management which explains how to raise those limits. You’ll want to make sure those values are set before your Apollo Client instance is loaded. I find it helpful to move the configuration into its own file and make it the first import to the file where you instantiate your ApolloClientinstance.