mirror of
https://github.com/apple/swift-nio.git
synced 2026-05-20 20:30:36 +00:00
### Motivation: As outlined in this [issue](https://github.com/apple/swift-nio/issues/2930) by @weissi, the current performance of calling `description` on `HTTPHeaders` is undermined by the dynamism of Array. ### Modifications: The proposed solution replaces the implementation of `description` to iterate over the items and print them out manually. This provides a faster solution since we bypass the cost of calling into `description` of an Array. ### Result: A more performant implementation of `HTTPHeaders` description. --------- Co-authored-by: Johannes Weiss <johannesweiss@apple.com> Co-authored-by: Cory Benfield <lukasa@apple.com>