Repository navigation
[Fusion] Reduce per-property and per-object work in value completion - #10696
Merged
michaelstaib merged 3 commits intoOct 26, 2026
Merged
Conversation
Walk source objects and arrays with row-carrying snapshot enumerators, so each value row is read once instead of again for CreateSnapshot and MoveNext. Dispatch object and list values straight to TryCompleteObjectValue and TryCompleteList when there is no error trie, and move error and response-name mapping paths into separate methods to shrink the hot frames. Initialize undefined object and array slots without re-reading the slot for layout tracking, and keep stackalloc out of CreateObject's common path so the method tiers up with PGO. Results are byte-identical. (cherry picked from commit f901fb2830fea2af3a8f60c92b9318295d9bb262)
InitializeObject and InitializeArray asserted that the raw token of the target slot is None. After an @interfaceObject upgrade, a selected field that the stand-in left undefined is a reference to an undefined slot, so Debug builds failed the assertion on a valid request. The assertions now check the resolved token; Release behavior is unchanged. Adds gateway regressions for an object-valued and a list-valued field completed after the upgrade, and removes comments that explained implementation details instead of contracts.
This was referenced Oct 28, 2026
Open
Merged
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.
When the gateway merged subgraph data into the final result, it read the data of every source property several times and went through a large general-purpose helper for every nested object and list. Value completion now walks source objects and arrays with enumerators that read each entry once, calls the object and list paths directly when no errors are involved, and keeps the rarely used error handling out of the hot loop. The produced results are byte for byte the same.
Measured on the federation benchmark twin machine with the benchmark's deep-recursion query (constant 50 VUs, gateway pinned to 4 logical cores), median of 4 interleaved 60 s runs against main. Throughput differences below about 2% are within run-to-run noise.