Files
swift-nio-http2/Sources
George Barnett 31db14091d Improve performance of HPACKHeaders.subscript(canonicalForm:) (#304)
Motivation:

When getting the canonical form of header values any ascii whitespace
is stripped from the values. The current implementation does this by
doing equality checks on Character and dropping them from a Substring.

Modifications:

- Update the Substring._trimWhitespace() function to trim on a UTF8 view
- Add test

Result:

Retrieving the canonical form of header values is cheaper, significantly
so when values contain a lot of leading or trailing whitespace.
2021-09-29 10:13:28 +01:00
..