Open eddeee888 opened 4 months ago
Potentially fixed by https://github.com/eddeee888/graphql-code-generator-plugins/pull/326
Alpha version:
yarn add -DE @eddeee888/typescript-resolver-files@pr326-run597-1
Hi @eddeee888
I tested this alpha version today and noticed a significant improvement in generation time. For context, we currently have around 250 resolver files, using resolverGeneration: 'minimal'.
Before this update:
Generation time with no mappers: ~6.5s With 1 mapper: ~11.2s With 2 mappers: ~12.5s - 13.6s With 3 mappers: ~12.8s - 13.8s
After this update:
Generation time with no mappers: ~2.2s With 1 mapper: ~7.5s - 8s With 2 mappers: ~8.5s With 3 mappers: ~8.5s - 9s
I ran codegen multiple times for each scenario, and while the times varied slightly, these ranges are representative of what I observed. Although adding mappers still increases the generation time by a factor of two or more, the overall time now is only slightly higher than our initial no-mapper generation time before the update, which is a significant improvement.
Thanks for trying and confirming @markbussard ! This is one of the quick fixes, I'll continue to try different things to make perf better in future releases 🙏
Describe the bug
There seems to be a performance issue when activating mappers. Could be related to static analysis
To Reproduce
Source: https://github.com/eddeee888/graphql-code-generator-plugins/issues/275#issuecomment-2125386883
Versions