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
Originally opened in graphql/graphql-js#4255 but the conclusion was that the implementation should happen here.
To recap:
The problem im facing is that when using graphql-tag im seeing huge memory chunks taken up by the query-strings (as far as 2.5mb) especially when using a lot of fragments.
As proposed by @JoviDeCroockhere I'd like to see the change that we reuse already declared definitions by merging them into the parsed document rather than parsing the definitions again (and again). In my local testing this would free up a lot of space both for the source and also for the docCache-Key and also should improve performance by just using the existing definitions rather than parsing them again.
The text was updated successfully, but these errors were encountered:
On first glance, that looks reasonable. We will soon start working on a new major release for this package, and I'm putting this issue on the list to go over for that milestone :)
Originally opened in graphql/graphql-js#4255 but the conclusion was that the implementation should happen here.
To recap:
The problem im facing is that when using graphql-tag im seeing huge memory chunks taken up by the query-strings (as far as 2.5mb) especially when using a lot of fragments.
The cause of this is this concat https://github.com/apollographql/graphql-tag/blob/main/src/index.ts#L125-L132 which will concat all used fragments into the to be parsed string which if you have alot of fragments result into a large string.
As proposed by @JoviDeCroock here I'd like to see the change that we reuse already declared definitions by merging them into the parsed document rather than parsing the definitions again (and again). In my local testing this would free up a lot of space both for the source and also for the docCache-Key and also should improve performance by just using the existing definitions rather than parsing them again.
The text was updated successfully, but these errors were encountered: