Skip to content

Tokio-quiche: lazily allocate H3 body_recv_buf#2546

Open
LynnLi100 wants to merge 1 commit into
cloudflare:masterfrom
LynnLi100:linlin/lazy-allocation
Open

Tokio-quiche: lazily allocate H3 body_recv_buf#2546
LynnLi100 wants to merge 1 commit into
cloudflare:masterfrom
LynnLi100:linlin/lazy-allocation

Conversation

@LynnLi100

Copy link
Copy Markdown

H3Driver eagerly allocated a 64 KiB body receive buffer per connection at construction. Make it Option<Limit>, allocate it lazily on the first body read, and release it once no streams or flows remain, so idle connections hold no receive buffer.

@LynnLi100
LynnLi100 requested a review from a team as a code owner July 16, 2026 20:59
@LynnLi100
LynnLi100 force-pushed the linlin/lazy-allocation branch from f88cc0a to cda5586 Compare July 17, 2026 19:50
@LynnLi100

Copy link
Copy Markdown
Author

the nightly failure is the known fix-nightly issue (#2545), after #2545 is merged I'll rebase the pr then it'll be fixed

@LynnLi100
LynnLi100 force-pushed the linlin/lazy-allocation branch 3 times, most recently from c76f92d to 5b15134 Compare July 20, 2026 07:36
Comment thread tokio-quiche/src/http3/driver/mod.rs Outdated
H3Driver eagerly allocated a 64 KiB body receive buffer per connection at construction. Make it Option<Limit<BytesMut>>, allocate it lazily on the first body read, and release it once no streams or flows remain, so idle connections hold no receive buffer.
@LynnLi100
LynnLi100 force-pushed the linlin/lazy-allocation branch from 5b15134 to 10e665c Compare July 20, 2026 14:50
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