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

matchtree: always use evalMatchTree #698

Merged
merged 2 commits into from
Nov 17, 2023
Merged

matchtree: always use evalMatchTree #698

merged 2 commits into from
Nov 17, 2023

Conversation

keegancsmith
Copy link
Member

From reading the implementation recently I noticed that we should always go via evalMatchTree to ensure we correctly use the known map for caching. This updates the two call sites we didn't do this as well as documenting this requirement.

I don't think this caused any noticeable performance issues. We would do slightly more work in the case the root matchTree was an andMatchTree (or other multi children nodes), but it would have been miniscule.

Test Plan: go test

From reading the implementation recently I noticed that we should always
go via evalMatchTree to ensure we correctly use the known map for
caching. This updates the two call sites we didn't do this as well as
documenting this requirement.

I don't think this caused any noticeable performance issues. We would do
slightly more work in the case the root matchTree was an and, but it
would have been miniscule.

Test Plan: go test
@keegancsmith keegancsmith requested a review from a team November 16, 2023 14:09
matchtree.go Outdated Show resolved Hide resolved
@keegancsmith keegancsmith merged commit c02b6e0 into main Nov 17, 2023
7 checks passed
@keegancsmith keegancsmith deleted the k/evalMatchTree branch November 17, 2023 13:48
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