Do not merge file patterns into a single regular expression #61104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #61103
Recommend viewing using Github's "Unified" view as some of these lines are quite long.
Benchmark
Running
tsc
on this repo which demonstrates slow performance: https://github.com/MichaelMitchell-at/typescript_slow_wildcards_reproBefore:
$ hyperfine 'node ./built/local/tsc.js -p ../typescript_slow_wildcards_repro/tsconfig.json' Benchmark 1: node ./built/local/tsc.js -p ../typescript_slow_wildcards_repro/tsconfig.json Time (mean ± σ): 7.720 s ± 0.237 s [User: 7.780 s, System: 0.071 s] Range (min … max): 7.480 s … 8.280 s 10 runs
After:
$ hyperfine 'node ./built/local/tsc.js -p ../typescript_slow_wildcards_repro/tsconfig.json' Benchmark 1: node ./built/local/tsc.js -p ../typescript_slow_wildcards_repro/tsconfig.json Time (mean ± σ): 365.1 ms ± 14.9 ms [User: 680.9 ms, System: 45.8 ms] Range (min … max): 353.1 ms … 403.9 ms 10 runs