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

Add priority to event prefilters. #1378

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Add priority to event prefilters. #1378

merged 2 commits into from
Mar 5, 2024

Conversation

LadyCailin
Copy link
Member

This allows for prefilters to be processed in order of least to highest complexity, leading to more efficient processing of events that don't match. For instance, matching a regex is more expensive than matching a boolean, so we check the boolean first, and if it doesn't match, then we don't try the regex match, whether or not it would match. General prefilter types have been given a default complexity, but as every prefilter is different, it's also possible for individual overrides to provide a custom priority instead.

This allows for prefilters to be processed in order of least to highest
complexity, leading to more efficient processing of events that don't
match. For instance, matching a regex is more expensive than matching a
boolean, so we check the boolean first, and if it doesn't match, then we
don't try the regex match, whether or not it would match. General
prefilter types have been given a default complexity, but as every
prefilter is different, it's also possible for individual overrides to
provide a custom priority instead.
@LadyCailin LadyCailin merged commit 416a628 into master Mar 5, 2024
2 of 4 checks passed
@LadyCailin LadyCailin deleted the prefilterPriorities branch March 5, 2024 20:32
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.

None yet

1 participant