Skip to content

[Fusion] Eliminate redundant parse-flag rescans in SourceResultDocument - #10082

Merged
michaelstaib merged 2 commits into
mainfrom
mst/remove-rescan
Jul 10, 2026
Merged

michaelstaib merged 2 commits into
mainfrom
mst/remove-rescan

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 10, 2026 10:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes SourceResultDocument JSON parsing by removing redundant rescans of already-parsed token data, relying instead on Utf8JsonReader’s existing parsing state.

Changes:

  • Use Utf8JsonReader.ValueIsEscaped to mark string/property-name tokens that require unescaping, eliminating a manual backslash scan over ValueSpan/ValueSequence.
  • Stop scanning number tokens for scientific notation and always store HasComplexChildren = false for numbers, aligning with the documented meaning of the flag and avoiding extra work.
  • Simplify the number-token append helper signature by removing the now-unused Utf8JsonReader parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@michaelstaib
michaelstaib merged commit d333c52 into main Jul 10, 2026
145 of 147 checks passed
@michaelstaib
michaelstaib deleted the mst/remove-rescan branch July 10, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants