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

HPACKHeaders.peekPseudoHeader allocates awkward temporary array #244

Closed
Lukasa opened this issue Sep 22, 2020 · 0 comments · Fixed by #246
Closed

HPACKHeaders.peekPseudoHeader allocates awkward temporary array #244

Lukasa opened this issue Sep 22, 2020 · 0 comments · Fixed by #246
Labels
area/performance Improvements to performance.

Comments

@Lukasa
Copy link
Contributor

Lukasa commented Sep 22, 2020

To peek the pseudo header we need to allocate an array for the subscript. We ideally wouldn't do that: we want a single value from the backing storage. Probably this requires some different API on HPACKHeaders to iterate the headers rather than create the intermediate array, and then a slightly awkward additional data-structure to handle getting only the first element and checking whether the second exists.

Before fixing this we should add an allocation counter check to validate that the allocations occur and to confirm their absence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance Improvements to performance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant