mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: When originally written our HPACK implementation targetted Swift 4.2, which had performance issues when storing mostly-ASCII data in Strings. For this reason we had a number of data types that used ByteBuffers as their backing storage and reified Strings when necessary. In Swift 5 this is no longer worthwhile: in fact, it imposes performance penalties above and beyond simply using the Strings. For this reason, we should move to a simpler model where we simply store Strings again. Modifications: - Rewrote all HPACK data structures to use Strings as their backing store. - Removed now-redundant genericism. - Removed now-unnecessary StringRing data structure and associated tests. Result: Faster performance in almost all cases.