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

Optimize path secret Entry size #2329

Merged
merged 3 commits into from
Sep 27, 2024
Merged

Conversation

Mark-Simulacrum
Copy link
Collaborator

Description of changes:

This adds a custom SizeOf trait and implements it for the types contained in a given Entry, and adds a GHA CI-only test that checks the size of the entry is as we expect. It's likely that we will want to change this but this is an initial proposal of how to do that without breaking downstream consumers.

We also add a benchmark for hmac init (locally I get 200-600ns depending on key type) and removes the OnceCell cache as part of Entry, bringing us down to ~300 bytes.

Testing:

See added test.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

camshaft
camshaft previously approved these changes Sep 25, 2024
@camshaft
Copy link
Contributor

Oh looks like we have a failing check where we're asserting the size of the entry:

https://github.com/aws/s2n-quic/actions/runs/10998636381/job/30537103568?pr=2329#step:11:894

@Mark-Simulacrum Mark-Simulacrum force-pushed the sizing-path-secrets branch 2 times, most recently from 86ca7e7 to 6c8ae05 Compare September 27, 2024 16:15
@camshaft camshaft enabled auto-merge (squash) September 27, 2024 16:35
@camshaft camshaft merged commit 91f1606 into aws:main Sep 27, 2024
117 of 119 checks passed
@Mark-Simulacrum Mark-Simulacrum deleted the sizing-path-secrets branch September 27, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants