Repository navigation
[Fusion] Reduce metadb row reads in the result merge hot path - #10075
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces metadata DB row reads on the Fusion result-merge hot path by enabling single-row retrieval patterns and in-place meta row updates that preserve parent pointers.
Changes:
- Added APIs to fetch the underlying parsed/meta row once (SourceResultElement/Document) to avoid repeated reads for token type + range.
- Introduced
ReplacePreserveParentto overwrite meta rows in-place without re-reading the parent pointer. - Added
TryGetPropertyoverloads that return both the value element and itsSelectionto avoid extra selection resolution work inValueCompletion.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/SourceResultElement.cs | Adds GetValueRow() to expose the parsed row for reuse. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/SourceResultDocument.Text.cs | Adds GetValueRow(Cursor) helper for callers to reuse a single row read. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/CompositeResultElement.cs | Adds internal TryGetProperty overload returning Selection. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/CompositeResultDocument.TryGetProperty.cs | Adds TryGetNamedPropertyValue overload returning Selection alongside the value. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/CompositeResultDocument.MetaDb.cs | Adds ReplacePreserveParent fast-path overwrite method. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/CompositeResultDocument.cs | Switches assignments to use ReplacePreserveParent and source row reads. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Results/ValueCompletion.cs | Uses new property lookup overload to reuse Selection and reduce meta reads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+432
to
+437
| // int 1: OperationReferenceId + OperationReferenceType + Flags | ||
| Unsafe.WriteUnaligned( | ||
| ref Unsafe.Add(ref row, DbRow.SelectionAndFlagsOffset), | ||
| operationReferenceId | ||
| | ((int)operationReferenceType << 15) | ||
| | ((int)flags << 17)); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was referenced Jul 13, 2026
This was referenced Jul 20, 2026
chore(deps): Bump HotChocolate.Subscriptions.InMemory from 15.1.14 to 16.5.1
Kuestenlogik/Bowire#506
Merged
This was referenced Aug 1, 2026
This was referenced Sep 1, 2026
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 18 updates
DFE-Digital/SUI_Matcher#397
Closed
Closed
This was referenced Sep 15, 2026
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#405
Closed
This was referenced Sep 22, 2026
Closed
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#410
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.
No description provided.