mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
Motivation: B2MD called out to the decoder's `shouldReclaimBytes` after every parsing attempt, even if the parser said `.continue`. That's quite pointless because we won't add any bytes into the buffer before we're trying the parser again. Modifications: Only ask the decoder if we should reclaim bytes if the decoder actually says `.needMoreData`. Result: Faster, better, more sensible.