quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Remove redundant copying outgoing packets. #1271

Closed TimonPost closed 2 years ago

TimonPost commented 2 years ago

Both proto::Endpoint.transmits and and quinn::Endpoint.outgoing queue transmit packets, and in drive send both queues are fetched and drained while this isn't required (from what I can tell). This PR removes the outgoing queue in quinn::Endpoint and simplifies it to only use proto::Endpoint.transmits for all outgoing packets.

This should remove redundant copying of transmits, and queue allocations.

left: before, right: this PR

image

djc commented 2 years ago

Probably good to rebase this and make sure it passes the tests first.

TimonPost commented 2 years ago

Im closing it temporarily to prevent CI from triggering while I try to fix the tests on unix