##// END OF EJS Templates
rust-regex: increase the DFA size limit for the `regex` crate...
Raphaël Gomès -
r45286:b15a37d8 stable
parent child Browse files
Show More
@@ -358,6 +358,10 b' fn re_matcher('
358 let pattern_string = unsafe { String::from_utf8_unchecked(escaped_bytes) };
358 let pattern_string = unsafe { String::from_utf8_unchecked(escaped_bytes) };
359 let re = regex::bytes::RegexBuilder::new(&pattern_string)
359 let re = regex::bytes::RegexBuilder::new(&pattern_string)
360 .unicode(false)
360 .unicode(false)
361 // Big repos with big `.hgignore` will hit the default limit and
362 // incur a significant performance hit. One repo's `hg status` hit
363 // multiple *minutes*.
364 .dfa_size_limit(50 * (1 << 20))
361 .build()
365 .build()
362 .map_err(|e| PatternError::UnsupportedSyntax(e.to_string()))?;
366 .map_err(|e| PatternError::UnsupportedSyntax(e.to_string()))?;
363
367
General Comments 0
You need to be logged in to leave comments. Login now