diff rust/hg-core/src/matchers.rs @ 44911:fd3b94f1712d

merge with stable
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 26 May 2020 08:07:24 -0700
parents ad1ec40975aa b15a37d85dbe
children 9f96beb9bafe
line wrap: on
line diff
--- a/rust/hg-core/src/matchers.rs	Sun May 17 18:33:45 2020 -0400
+++ b/rust/hg-core/src/matchers.rs	Tue May 26 08:07:24 2020 -0700
@@ -366,6 +366,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()))?;