Skip to content

Reduce flush overhead in streaming stdout copies#609

Merged
ryanfowler merged 1 commit into
mainfrom
fix-streaming-flush-overhead
May 26, 2026
Merged

Reduce flush overhead in streaming stdout copies#609
ryanfowler merged 1 commit into
mainfrom
fix-streaming-flush-overhead

Conversation

@ryanfowler
Copy link
Copy Markdown
Owner

Summary

  • Remove per-chunk flush() calls from async stdout/pager streaming so large responses can flow through without forcing a flush on every 16 KiB write.
  • Increase the internal copy buffer to 64 KiB to reduce read/write overhead on long streaming responses.
  • Add regression tests that verify the streaming helpers still copy all bytes while flushing only once at the end.

Testing

  • cargo fmt
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo test --all-features

@ryanfowler ryanfowler enabled auto-merge May 26, 2026 23:22
@ryanfowler ryanfowler merged commit 516b74d into main May 26, 2026
4 checks passed
@ryanfowler ryanfowler deleted the fix-streaming-flush-overhead branch May 26, 2026 23:26
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