Skip to content

[Fusion] Reduce forwarded-variable projection allocations - #10584

Merged
tobias-tengler merged 1 commit into
mainfrom
tte/fusion-forwarded-variable-projection
Oct 18, 2026
Merged

tobias-tengler merged 1 commit into
mainfrom
tte/fusion-forwarded-variable-projection

Conversation

@tobias-tengler

@tobias-tengler tobias-tengler commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Fusion creates temporary GraphQL field nodes, name nodes and an array for forwarded variables on each source fetch without entity requirements.

This PR writes those variable names and values directly into the existing request buffer, preserving omission, nulls, order and the requirements fallback.

Method Version Mean Ratio Allocated Alloc Ratio
Forward 1 supplied variable, 4 selected main 0.482 us 1.00 640 B 1.00
Forward 1 supplied variable, 4 selected PR 0.472 us 0.98 480 B 0.75
Forward 4 supplied variables main 0.661 us 1.00 856 B 1.00
Forward 4 supplied variables PR 0.613 us 0.93 512 B 0.60
All 4 selected variables omitted main 0.428 us 1.00 536 B 1.00
All 4 selected variables omitted PR 0.431 us 1.01 480 B 0.90
No forwarded variables main 0.365 us 1.00 416 B 1.00
No forwarded variables PR 0.376 us 1.03 416 B 1.00

@github-actions

Copy link
Copy Markdown
Contributor

Patch coverage

100.0% of changed lines covered (21/21)

File Covered Changed Patch %
…/src/Fusion.Execution/Execution/OperationPlanContext.cs 2 2 100.0% 🟢
…/src/Fusion.Execution/Execution/Results/FetchResultStore.cs 19 19 100.0% 🟢

Project coverage: 59.0% (311473/527774 lines)

@tobias-tengler
tobias-tengler marked this pull request as ready for review October 18, 2026 05:59
Copilot AI balanced review requested due to automatic review settings October 18, 2026 05:59

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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