mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: The outbound flow control buffer currently does a linear scan through the pending data objects to work out how many bytes were buffered. Let's burn an integer and just calculate these on the way in, making flushes way cheaper. Modifications: - Update the number of bytes when we buffer the write, and make flushes cheaper. Result: Moderate performance improvement in high throughput server benchmarks (around 4%).