Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use iterator when checking encoding headers #1563

Merged
merged 3 commits into from
Feb 7, 2023

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Feb 7, 2023

Motivation:

SwiftNIO HTTP/2 1.24.0 added a method for retrieving a sequence of header values rather than directly returning an array of values. We can use it when checking the encoding header as there should only be at most one value.

Modifications:

  • Update HTTP/2 to be min 1.24.1
  • Use the iterator API

Result:

Fewer allocations.

Motivation:

SwiftNIO HTTP/2 1.24.0 added a method for retrieving a sequence of
header values rather than directly returning an array of values. We can
use it when checking the encoding header as there should only be at most
one value.

Modifications:

- Update HTTP/2 to be min 1.24.0
- Use the iterator API

Result:

Fewer allocations.
@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Feb 7, 2023
@glbrntt glbrntt force-pushed the gb-headers-sequence branch from e1fcc05 to 9e422c1 Compare February 7, 2023 16:21
@glbrntt glbrntt merged commit a70e9ad into grpc:main Feb 7, 2023
@glbrntt glbrntt deleted the gb-headers-sequence branch February 7, 2023 17:04
WendellXY pushed a commit to sundayfun/grpc-swift that referenced this pull request Aug 24, 2023
Motivation:

SwiftNIO HTTP/2 1.24.0 added a method for retrieving a sequence of
header values rather than directly returning an array of values. We can
use it when checking the encoding header as there should only be at most
one value.

Modifications:

- Update HTTP/2 to be min 1.24.0
- Use the iterator API

Result:

Fewer allocations.
pinlin168 pushed a commit to sundayfun/grpc-swift that referenced this pull request Aug 24, 2023
Motivation:

SwiftNIO HTTP/2 1.24.0 added a method for retrieving a sequence of
header values rather than directly returning an array of values. We can
use it when checking the encoding header as there should only be at most
one value.

Modifications:

- Update HTTP/2 to be min 1.24.0
- Use the iterator API

Result:

Fewer allocations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants