Skip to content

perf: hoist streaming codec capability checks to stream scope - #724

Merged
SunSi12138 merged 9 commits into
devfrom
issue-723-hoist-stream-codec-capabilities
Sep 21, 2026
Merged

SunSi12138 merged 9 commits into
devfrom
issue-723-hoist-stream-codec-capabilities

Conversation

@SunSi12138

Copy link
Copy Markdown
Owner

Closes #723

Summary

  • cache IRpcSizedCodec<T> / CanExactSize once when each client stream starts
  • pass the cached exact-size capability into client stream publication so TryGetEncodedSize remains per-item
  • cache the same capability once for generated server outbound streams
  • preserve existing exact-size credit-before-serialize and unsized pre-credit budget paths
  • add regression coverage that CanExactSize is read once per stream while sizing/serialization remain per-item

Validation

  • existing client deadline/publication behavior remains on the same send helpers
  • existing generated-server deadline/cancellation flow remains unchanged
  • added exact-size generated outbound coverage and non-exact client-stream coverage

Base: dev

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.

1 participant