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

btf: remove Spec.firstTypeID() #990

Merged
merged 1 commit into from
Mar 28, 2023
Merged

btf: remove Spec.firstTypeID() #990

merged 1 commit into from
Mar 28, 2023

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Mar 28, 2023

Turn firstTypeID into a cached field instead of recalculating it on the fly. Map accesses with a Type as key are expensive, wich in turn make Spec.TypeByID more expensive than it has to be.

Turn firstTypeID into a cached field instead of recalculating it
on the fly. Map accesses with a Type as key are expensive, wich
in turn make Spec.TypeByID more expensive than it has to be.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb requested review from ti-mo and rgo3 March 28, 2023 14:38
@lmb lmb merged commit b9de15e into cilium:master Mar 28, 2023
@lmb lmb deleted the btf-first-type-id branch March 28, 2023 15:39
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