Skip to content

Commit

Permalink
Add 'perf' feature flag on regex crate
Browse files Browse the repository at this point in the history
Our grok crate is unusual. We use regex in certain places like date parsing and
onig when dealing with the grok patterns themselves. Work on #11206 strongly
suggests that if sinks are allowed to run less subject to slow receiver issue
then `apply_date_filter` is a CPU hotspot. As suggested by @tobz we enable the
'perf' flags to the regex crate, which features heavily in the implementation of
that function.

Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
  • Loading branch information
blt committed Feb 8, 2022
1 parent 2e19f61 commit 9d0ecc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/grok/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ once_cell = { version = "1.9", default-features = false, features = ["std", "par
onig = { version = "6.3", default-features = false }
ordered-float = { version = "2", default-features = false }
peeking_take_while = { version = "1.0.0", default-features = false }
regex = { version = "1", default-features = false }
regex = { version = "1.5", default-features = false, features = ["perf"] }
serde = { version = "1.0.136", default-features = false }
serde_json = { version = "1.0.78", default-features = false }
strum_macros = { version = "0.23", default-features = false }
Expand Down

0 comments on commit 9d0ecc9

Please sign in to comment.