Skip to content

[Fusion] Avoid list wrappers for pocketed error snapshots - #10597

Closed
tobias-tengler wants to merge 1 commit into
mainfrom
tte/fusion-pocketed-error-snapshots
Closed

tobias-tengler wants to merge 1 commit into
mainfrom
tte/fusion-pocketed-error-snapshots

Conversation

@tobias-tengler

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

Copy link
Copy Markdown
Member

Capturing pocketed errors creates a list wrapper even though completion callers only enumerate the eager snapshot.

This PR returns a fresh eager array directly from the snapshot helper.

Entry order, shared path/error references and snapshot isolation during callbacks are preserved; focused tests pass on .NET 10 and .NET 11.

Release .NET 10 measurements of snapshot capture plus a common indexed reference consumer against pinned main 15888585e1 show stable three-error allocation reduction from 104 to 72 B (32 B, 30.77%). The accepted elapsed costs are 12.71% (3.88 ns) for three errors and 6.61% (1.11 ns) for one error; no elapsed improvement is claimed. One-error allocation readings were 72/72→0/40 B across repetitions, so the displayed 72→20 B arithmetic mean is uncertain and supports no allocation claim. The empty guard is a control.

Method Version Mean Ratio Allocated Alloc Ratio
Empty guard control main 0.861 ns 1.00 0 B N/A
Empty guard control PR 0.596 ns 0.69 0 B N/A
One pocketed error snapshot main 16.783 ns 1.00 72 B 1.00
One pocketed error snapshot PR 17.893 ns 1.07 20 B 0.28
Three pocketed errors snapshot main 30.496 ns 1.00 104 B 1.00
Three pocketed errors snapshot PR 34.372 ns 1.13 72 B 0.69

@github-actions

Copy link
Copy Markdown
Contributor

Patch coverage

100.0% of changed lines covered (1/1)

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

Project coverage: 59.0% (311445/527757 lines)

@tobias-tengler
tobias-tengler deleted the tte/fusion-pocketed-error-snapshots branch October 21, 2026 15:45
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.

1 participant