Increase performance of nested queries#28
Conversation
|
I ported this PR over from mhallin/graphql_ppx#85 and this should also fix #27 I'm unable to run the tests locally so if I could get some guidance that would be really appreciated :D |
|
I got the tests to run and things look good! I also was able to manually-inspect the generated JS which looks correct. I think this is gtg. |
|
Could you please rebase to master. I've pushed some fixes to how tests are run and it should trigger GH Actions for this PR. |
With nested queries the code was switching on the option so that it could display a custom message. This was causing a massive increase in compilation time as the queries got deeper and wider. In my project we were seeing build times of about 6 minutes, after this change the build went down to about 10-11 seconds. Instead of displaying a custom message, the PPX will now just call out to `Js.Option.getExn`.
2e17ed6 to
6316422
Compare
|
@baransu done! |
|
I would love to see this merged. It fixes the slow compile times and the generated code size in our project. |
baransu
left a comment
There was a problem hiding this comment.
Thank you for the change! We're trading more verbose error messages with compile-time performance and generated code but it's is fine in this case. LGTM!
With nested queries the code was switching on the option so that it
could display a custom message. This was causing a massive increase in
compilation time as the queries got deeper and wider. In my project we
were seeing build times of about 6 minutes, after this change the build
went down to about 10-11 seconds.
Instead of displaying a custom message, the PPX will now just call out
to
Js.Option.getExn.