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

Make HTTP2StreamChannel non-generic #242

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Sep 22, 2020

Motivation:

As part of the work done for #214 we made HTTP2StreamChannel generic
over the type of data it reads and writes. Unfortunately this cost us a
non-trivial amount of performance.

Modifications:

  • Remove the genericism from 'HTTP2StreamChannel' by adding a mode for the
    stream data type the channel is operating on (frames or frame
    payloads), wrapping and unwrapping the data where necessary.
  • Simplify the implementation of 'MultiplexerAbstractChannel'
  • Remove 'HTTP2FrameConvertible' since it is no longer required

Result:

A perf win, hopefully.

Motivation:

As part of the work done for apple#214 we made `HTTP2StreamChannel` generic
over the type of data it reads and writes. Unfortunately this cost us a
non-trivial amount of performance.

Modifications:

- Remove the genericism from 'HTTP2StreamChannel' by adding a mode for the
  stream data type the channel is operating on (frames or frame
  payloads), wrapping and unwrapping the data where necessary.
- Simplify the implementation of 'MultiplexerAbstractChannel'
- Remove 'HTTP2FrameConvertible' since it is no longer required

Result:

A perf win, hopefully.
@glbrntt glbrntt requested a review from Lukasa September 22, 2020 08:24
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Sep 22, 2020
@glbrntt
Copy link
Contributor Author

glbrntt commented Sep 22, 2020

@swift-nio-bot test this please

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. No particular notes here, thanks for cleaning this up!

@Lukasa Lukasa merged commit 860a6e7 into apple:master Sep 22, 2020
@glbrntt glbrntt deleted the gb-non-generic-stream-channel branch September 22, 2020 10:06
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