-
Notifications
You must be signed in to change notification settings - Fork 221
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
Add a faster version of the field selection merging validation #458
Closed
acceleratesage
wants to merge
52
commits into
sangria-graphql:master
from
xing:fast-overlapping-fields-validation
Closed
Add a faster version of the field selection merging validation #458
acceleratesage
wants to merge
52
commits into
sangria-graphql:master
from
xing:fast-overlapping-fields-validation
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implements a faster version of OverlappingFieldsCanBeMerged, that can deal with a high number of fragments or selection sets without a blowup in runtime. Also includes JMH for benchmarks. Refs: https://tech.xing.com/graphql-overlapping-fields-can-be-merged-fast-ea6e92e0a01
This was referenced Sep 19, 2019
This reverts commit 14690b2.
…ic_release_notes automate release notes
…raph-4.0.7 Update classgraph to 4.0.7
…raph-4.8.52 Update classgraph to 4.8.52
…raph-4.8.53 Update classgraph to 4.8.53
…args Use AstSchemaBuilder from args rather the default one
extend ProjectionNames to include Args
Co-Authored-By: Yann Simon <[email protected]>
…ore-2.1.0 Update fs2-core to 2.1.0
…tch-size Apply max batch size to relation
Also fixes the compilcation on scala 2.11 as that version did not support SAM lambdas.
Also initialized buffers for these fields with null to remove allocations, as many fields will not have child selections or fragment spreads.
Migrated to the new temporary sangria organization: sangria-graphql-org#12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current OverlappingFieldsCanBeMerged validation has performance problems with a high number of fragments or selection sets. This implements a faster version of OverlappingFieldsCanBeMerged, that can deal with a high number of fragments or selection sets without a blowup in runtime.
It also includes JMH for benchmarks.
Fixes: #296
The algorithm is described in:
https://tech.xing.com/graphql-overlapping-fields-can-be-merged-fast-ea6e92e0a01
Below is an example benchmark graph showing the performance improvement for multiple fragments in the same selection set.