mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: Currently swift-nio-http2 is extremely naive with its use of channelReadComplete calls in HTTP2StreamChannel, firing one channelReadComplete call per frame read. In high frame load cases this leads to a lot of excessive channelReadComplete traffic, which can cause unnecessary time spent in flush calls. We should try to minimise the amount of time we spend on this bookkeeping and save the CPU cost. Modifications: - Store a linked-list of HTTP2StreamChannels that need to have channelReadComplete fired on them. - Fire channelReadComplete based on this linked list. Result: Moderate improvement in performance in high-throughput workloads.