Repository navigation
Perf/allocations - #70
Merged
Merged
Conversation
Measured with the benchmark's new allocation column (heap bytes per request from GC.stats), before and after on the same machine: scenario alloc/req req/s small -34% +46% flat_list -41% +37% nested_tree -26% +32% nested_concurrent -21% +28% union_fragments -25% +18% mutations -25% +18% introspection -27% +30% Per request: nodes keep their source offset and derive line and column only when an error needs them, instead of the parser building a line table for every query; list parsing takes blocks instead of allocating a Proc per call; nodes without arguments, directives, selections or variables share frozen empty arrays; node constructors re-map an array only when its element type must widen; operations are found by scanning definitions rather than visiting the whole tree into an array; and a request without a `$` skips variable resolution and substitution. Per object: plain selection sets (fields only, no directives, distinct keys) are resolved directly without collecting into a map, and the collection step that remains uses an array; leaf fields, leaf lists and successful fragments return one shared empty error array instead of allocating their own; sequential list elements are buffered inline without a closure, a pending slot or a path array each.
This file contains hidden or 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
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.
No description provided.