Skip to content

Tokio-quiche: lazily allocate H3 body_recv_buf#2546

Merged
nmicht merged 1 commit into
cloudflare:masterfrom
LynnLi100:linlin/lazy-allocation
Jul 22, 2026
Merged

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

Conversation

@LynnLi100

Copy link
Copy Markdown
Contributor

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
Contributor 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
@LynnLi100
LynnLi100 force-pushed the linlin/lazy-allocation branch from 5b15134 to 10e665c Compare July 20, 2026 14:50
Comment thread tokio-quiche/src/http3/driver/tests.rs Outdated
Comment thread tokio-quiche/src/http3/driver/mod.rs
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 10e665c to 43740c7 Compare July 22, 2026 05:02
Comment thread tokio-quiche/src/http3/driver/mod.rs
@nmicht
nmicht merged commit 400bb39 into cloudflare:master Jul 22, 2026
23 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.

6 participants