[Updated] D8499: rust-regex: increase the DFA size limit for the `regex` crate
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Thu May 7 14:58:29 UTC 2020
Closed by commit rHGb15a37d85dbe: rust-regex: increase the DFA size limit for the `regex` crate (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8499?vs=21276&id=21279
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8499/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8499
AFFECTED FILES
rust/hg-core/src/matchers.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/matchers.rs b/rust/hg-core/src/matchers.rs
--- a/rust/hg-core/src/matchers.rs
+++ b/rust/hg-core/src/matchers.rs
@@ -358,6 +358,10 @@
let pattern_string = unsafe { String::from_utf8_unchecked(escaped_bytes) };
let re = regex::bytes::RegexBuilder::new(&pattern_string)
.unicode(false)
+ // Big repos with big `.hgignore` will hit the default limit and
+ // incur a significant performance hit. One repo's `hg status` hit
+ // multiple *minutes*.
+ .dfa_size_limit(50 * (1 << 20))
.build()
.map_err(|e| PatternError::UnsupportedSyntax(e.to_string()))?;
To: Alphare, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200507/e1d94322/attachment-0002.html>
More information about the Mercurial-patches
mailing list