| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
In the all-synchronous execution path (no CompletableFutures), Async$Many allocated an Object[] to collect field values, then copied them into a new ArrayList in materialisedList(). Replace the copy with Arrays.asList() which wraps the existing array at zero cost. Benchmarked with a new ExecutionBenchmark (balanced tree: ~530 fields, ~2000 result scalars, depth 5) showing ~5% throughput improvement on the synchronous path. Also adds async-profiler support to build.gradle for JMH profiling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test Results 335 files ±0 335 suites ±0 5m 3s ⏱️ -1s Results for commit c52498b. ± Comparison against base commit f8f9892. This pull request removes 196 and adds 172 tests. Note that renamed tests count towards both. ?
, expected: combo-\"\\\b\f\n\r\t, #4]
__schema { types { fields { args { type { name fields { name }}}}}}
__schema { types { fields { type { name fields { name }}}}}
__schema { types { inputFields { type { inputFields { name }}}}}
__schema { types { interfaces { fields { type { interfaces { name } } } } } }
__schema { types { name} }
__type(name : "t") { name }
a1: __schema { types { name} }
a1: __type(name : "t") { name }
…
graphql.AssertTest ‑ assertFalse with different number of error args but false does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_21prov0_closure23@75de29c0 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1, #0] graphql.AssertTest ‑ assertFalse with different number of error args but false does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_21prov0_closure24@fc807c1 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1 arg2, #1] graphql.AssertTest ‑ assertFalse with different number of error args but false does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_21prov0_closure25@296e281a delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1 arg2 arg3, #2] graphql.AssertTest ‑ assertFalse with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_20prov0_closure20@6dcc40f5 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1, #0] graphql.AssertTest ‑ assertFalse with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_20prov0_closure21@2b680207 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1 arg2, #1] graphql.AssertTest ‑ assertFalse with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_20prov0_closure22@70887727 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1 arg2 arg3, #2] graphql.AssertTest ‑ assertNotNull with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_5prov0_closure3@730f9695 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1, #0] graphql.AssertTest ‑ assertNotNull with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_5prov0_closure4@146dcfe6 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1 arg2, #1] graphql.AssertTest ‑ assertNotNull with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_5prov0_closure5@1b1f5012 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1 arg2 arg3, #2] graphql.AssertTest ‑ assertNotNull with different number of error args with non null does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_6prov0_closure6@51c959a4 delegate=inaccessible owner=inaccessible thisObject=inaccessible resolveStrategy=inaccessible directive=inaccessible parameterTypes=inaccessible maximumNumberOfParameters=inaccessible bcw=inaccessible thisType=inaccessible>, expectedMessage: error arg1, #0] … ♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
…cations The toString representation of ResultPath was eagerly computed in the constructor via initString(), but is never read during normal query execution — only used for error reporting. Make it lazy (computed on first toString() call) to eliminate all string work from the hot path. Also inline segmentToString() into initString() to avoid intermediate String allocations when the value is eventually computed, letting Java's StringConcatFactory handle it as a single multi-arg concat. Benchmarked ~30-78% throughput improvement vs master across all execution benchmarks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Every field fetch created a throwaway FieldCoordinates object just for a HashMap lookup. Add an internal nested Map<String, Map<String, ...>> (typeName → fieldName → factory) built at CodeRegistry construction time, and an internal getDataFetcher(String, String, GraphQLFieldDefinition) method that does the lookup by strings directly. Use this in ExecutionStrategy.fetchField to skip FieldCoordinates creation entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ized-list-optimization
Remove @internal from the String-based getDataFetcher overload and add proper javadoc documenting the ~54 KB/op allocation savings and 5-9% throughput improvement over the FieldCoordinates-based lookup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…init Since toStringValue is lazily computed (once per path), the manual inlining of segmentToString() provides no measurable performance benefit. Simplify back to the clean delegation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
Three execution hot-path optimizations identified via async-profiler:
Also adds ExecutionBenchmark JMH benchmark and async-profiler support to build.gradle.
Benchmark results
Existing benchmarks (master vs optimized)
ExecutionBenchmark (new — only on optimized branch)
Test plan
🤖 Generated with Claude Code