You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pseudo headers must appear at the beginning of a block of headers. However, there's no API in HPACKHeaders to allow for this; it requires up-front knowledge that when constructed the pseudo headers are added first.
When a block of headers is provided (by a user, for example) which must then have pseudo headers added to it, a new block must be created, the pseudo headers added and then all of the headers from the provided block to be copied across. This incurs a potentially large unnecessary extra allocation.
HPACKHeaders is currently backed by an array, changing this to a CircularBuffer would allow cheap insertion to the front of the block via an add(pseudoHeader:value:) API.
The text was updated successfully, but these errors were encountered:
Pseudo headers must appear at the beginning of a block of headers. However, there's no API in
HPACKHeaders
to allow for this; it requires up-front knowledge that when constructed the pseudo headers are added first.When a block of headers is provided (by a user, for example) which must then have pseudo headers added to it, a new block must be created, the pseudo headers added and then all of the headers from the provided block to be copied across. This incurs a potentially large unnecessary extra allocation.
HPACKHeaders
is currently backed by an array, changing this to aCircularBuffer
would allow cheap insertion to the front of the block via anadd(pseudoHeader:value:)
API.The text was updated successfully, but these errors were encountered: