-
Notifications
You must be signed in to change notification settings - Fork 83
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 HEADERS frame payload non-indirect #428
Conversation
b438da2
to
34390e5
Compare
Can we add a unit test that checks that the size of |
34390e5
to
002ec5e
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great performance/allocation improvement!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! ⛳️
Sources/NIOHTTP2/HTTP2Frame.swift
Outdated
internal init(exclusive: Bool, dependency: HTTP2StreamID, weight: UInt8) { | ||
self.exclusive = exclusive | ||
self.dependency = dependency | ||
self.weight = weight | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the init
intentionally internal
before?
It's a parameter in Headers.init
but is defaulted to nil
so it looks like it not being public was an oversight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an oversight to me as well
The CI failure is interesting:
|
Motivation: In previous patches we shrank the size of HTTP2Frame by making various data types indirect in the frame payload. This included HEADERS, which is unfortunte as HEADERS frames are quite common. This patch changes the layout of the HEADERS frame to remove the indirect case. Modifications: - Move END_STREAM into an OptionSet. - Turn the two optional bits into flags in the aforementioned OptionSet - Replace the properties with computed properties. - Remove the indirect case Result: HEADERS frames are cheaper.
002ec5e
to
b42fbe5
Compare
Updated. |
Now we are hitting depreciation warnings because of the new NIO release:
|
I have reported the |
Motivation:
In previous patches we shrank the size of HTTP2Frame by making various data types indirect in the frame payload. This included HEADERS, which is unfortunte as HEADERS frames are quite common.
This patch changes the layout of the HEADERS frame to remove the indirect case.
Modifications:
Result:
HEADERS frames are cheaper.