-
-
Notifications
You must be signed in to change notification settings - Fork 139
Performance of validate, in the context of graphql(_sync) #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @alexchamberlain. Not sure if we have explicitly discussed this already. One issue is always when and how to avoid the validation step and not validating the same query multiple times (#70 is related to that). I'm glad about PRs that try to improve performance. However, the code should not deviate too much from the original code in GraphQL.js since this will make it difficult to merge future change in GraphQL.js back here. If you want to introduce larger algorithmic changes, it may make more sense to suggest them on the GraphQL.js issue tracker, implement these in JavaScript and then merge back here. |
Thanks. I will look into this if I find some time. Please note that there are already some benchmark scripts. It would make sense to add another benchmark that explicitly focuses on validation then. |
Ah, sorry - I completely missed that! I can look to refactor my benchmarks there if you like? |
I've benchmarked a few of our use cases and up to 85% of the runtime is in
validation.validate
; as far as I can tell, there's been no discussion of this on Issues, so I thought I'd open an issue to see if this is a known issue?I'll follow up with a PR that demonstrates the issue and has some improvements, but won't be production quality at this stage.
The text was updated successfully, but these errors were encountered: