Skip to content

[Fusion] Parse newline-delimited JSONL records as a single arena span - #10077

Merged
michaelstaib merged 4 commits into
mainfrom
mst/jsonl-fastpath
Jul 9, 2026
Merged

[Fusion] Parse newline-delimited JSONL records as a single arena span#10077
michaelstaib merged 4 commits into
mainfrom
mst/jsonl-fastpath

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 9, 2026 20:07

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 Fusion JSONL (newline-delimited JSON) response parsing by fast-pathing small records into a single arena span to reduce multi-segment ingestion overhead.

Changes:

  • Add a Fusion-only small-record fast path in JsonLinesReader that rents an exact-length arena chunk and parses in place as a single span.
  • Widen SourceResultDocument.DataOffsetMask visibility from private to internal.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/SourceResultDocument.cs Adjusts visibility of the data-location offset mask constant.
src/HotChocolate/AspNetCore/src/Transport.Http/JsonLines/JsonLinesReader.cs Adds a single-span parsing fast path for small JSONL records in Fusion builds.

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

Comment thread src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/SourceResultDocument.cs Outdated
Comment thread src/HotChocolate/AspNetCore/src/Transport.Http/JsonLines/JsonLinesReader.cs Outdated
michaelstaib and others added 3 commits July 9, 2026 22:20
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@michaelstaib
michaelstaib merged commit 9b948de into main Jul 9, 2026
144 of 146 checks passed
@michaelstaib
michaelstaib deleted the mst/jsonl-fastpath branch July 9, 2026 20: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