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

Update the message matcher to improve the literal pattern match speed #208

Closed
trink opened this issue Oct 4, 2017 · 2 comments
Closed

Comments

@trink
Copy link
Contributor

trink commented Oct 4, 2017

Current

Fields[environment.addons] =~ "pioneer%-opt%-in@mozilla%.org"

Proposed (add a modifier like in regex /foo/i)

Fields[environment.addons] =~ "[email protected]"%

Alternatives Considered

  • add a new operator =%(the modifier is a better fit for future extensions)
  • extend the existing =~ operator to detect if there are only escaping patterns in a match but this is more tedious for the user as the string still has to be fully escaped

Benefits

The speed of execution depends on the string lengths but for the telemetry case above a speed up of 2-3x is expected in the matcher. From the plugin perspective there will be a reduction in the maximum memory (estimate a 10x reduction) and a corresponding reduction in GC.

@trink trink changed the title Add a new message matcher operator to improve literal match speed Update the message matcher to improve the literal pattern match speed Oct 31, 2017
@trink
Copy link
Contributor Author

trink commented Nov 10, 2017

2e13919

@trink trink closed this as completed Nov 10, 2017
@trink trink reopened this Nov 10, 2017
@trink
Copy link
Contributor Author

trink commented Nov 10, 2017

The grammar was modified to only allow this operation on Headers

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

No branches or pull requests

1 participant