Do not merge file patterns into a single regular expression#61104
Open
MichaelMitchell-at wants to merge 1 commit intomicrosoft:mainfrom
Open
Do not merge file patterns into a single regular expression#61104MichaelMitchell-at wants to merge 1 commit intomicrosoft:mainfrom
MichaelMitchell-at wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
Author
|
Hm, after testing this change on our codebase, which is on the order of thousands of projects, I'm seeing a net performance decrease, but each individual project is sometimes faster or slower with this change. It seems that there's more nuance to this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
tscon 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 runsAfter:
$ 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