Add note about performance of tidy problematic consts
This commit is contained in:
parent
76ba11994e
commit
1cfc89ad69
@ -110,6 +110,7 @@ fn generate_problems<'a>(
|
||||
173390526, 721077,
|
||||
];
|
||||
|
||||
// Returns all permutations of problematic consts, over 2000 elements.
|
||||
fn generate_problematic_strings(
|
||||
consts: &[u32],
|
||||
letter_digit: &FxHashMap<char, char>,
|
||||
@ -319,6 +320,8 @@ fn skip(path: &Path, is_dir: bool) -> bool {
|
||||
ROOT_PROBLEMATIC_CONSTS,
|
||||
&[('A', '4'), ('B', '8'), ('E', '3')].iter().cloned().collect(),
|
||||
);
|
||||
// This creates a RegexSet as regex contains performance optimizations to be able to deal with these over
|
||||
// 2000 needles efficiently. This runs over the entire source code, so performance matters.
|
||||
let problematic_regex = RegexSet::new(problematic_consts_strings.as_slice()).unwrap();
|
||||
|
||||
walk(path, skip, &mut |entry, contents| {
|
||||
|
Loading…
Reference in New Issue
Block a user