Skip to content

Reduce v1 channel offer allocations - #1134

Merged
AArnott merged 1 commit into
dotnet:mainfrom
karpinsn:perf/20260728-nerdbank-streams-alloc-focus/04-channel-v1-offer-fixedsize
Jul 29, 2026
Merged

AArnott merged 1 commit into
dotnet:mainfrom
karpinsn:perf/20260728-nerdbank-streams-alloc-focus/04-channel-v1-offer-fixedsize

Conversation

@karpinsn

Copy link
Copy Markdown

Encode channel names directly into a single byte array instead of constructing a temporary Sequence.

Metric Baseline Candidate Improvement
Mean 103.13 ms 90.44 ms 12.3%
Allocated 9.16 MB 5.43 MB 40.7%

Encode channel names directly into a single byte array instead of constructing a temporary Sequence<byte>.

| Metric | Baseline | Candidate | Improvement |
|--------|---------:|----------:|------------:|
| Mean | 103.13 ms | 90.44 ms | 12.3% |
| Allocated | 9.16 MB | 5.43 MB | 40.7% |

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6ee5d961-cc68-4ccd-b47c-2275b7a49c8c
@AArnott
AArnott enabled auto-merge July 29, 2026 15:53

@AArnott AArnott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@AArnott
AArnott added this pull request to the merge queue Jul 29, 2026
Merged via the queue into dotnet:main with commit 53a9b34 Jul 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants