danielwaltz / vite-plugin-graphql-codegen

Zero-config vite plugin that uses the vite file watcher to run graphql codegen programmatically without needing to start a separate watcher
https://www.npmjs.com/package/vite-plugin-graphql-codegen
MIT License
83 stars 8 forks source link

chore: rewrite file watcher #32

Open yurks opened 5 months ago

yurks commented 5 months ago

Currently, file watcher asynchronously retrieves documents and schemas on each project file changes, which is slow, and caused unreasonably high resources usage.

Changes made

Also, this PR should resolve OOM issues reported in https://github.com/danielwaltz/vite-plugin-graphql-codegen/issues/27

Side changes

Before

image

After

image
danielwaltz commented 5 months ago

Thanks for your effort on these PRs! Hope to carve out the time in the next week or so to test them out and get them merged. 🎉