Reported via Slack. Reproduction: https://github.com/acidbluebriggs/apollo-cache-perf
From the README:
What this example will show is a large graphql query result being consumed by the client. The data is returned from a mock service using the json-server module from npmjs.org. The actual data is located in the file: mock-graphql-server/mock-graphql-response.json.
What to observe is how long compared to other browsers IE 11 takes to process the data and enter it into its cache. This dataset is just to give a decent example of the problem. Even when paging through records using a cursor, the processing of the subset of data will increase for each new request. It degrades consistently as the cache grows. It seems that there is an extremely large amount of "subscriber notifications" that occur during the cache writes. You can seem more information at:
*Note: Even though the response shows a relay style cursor, the result is not from a graphql server so changing the query will have no effect. The project is also using the latest beta of the cache to demonstrate the same issue appears as older versions.
Have you tried 1.2.5 version ? I got better performances with it
Thanks @goldo - yes, the original reporter tried the most recent version of apollo-cache-inmemory, as well as the 1.3.0-beta.5 (which includes the performance enhancements from https://github.com/apollographql/apollo-client/pull/3394), and the problem still persists.
Facing the same issue. Is this going to be addressed?
This should no longer be an issue with current versions of apollo-client. Thanks!
Why/how is that? We had to remove Apollo from our stack, and rewrite a lot of code, because of this unresolved issue.
@acidbluebriggs Using which version of apollo-client?
Most helpful comment
Facing the same issue. Is this going to be addressed?