Skip to content

Do not merge file patterns into a single regular expression#61104

Closed
MichaelMitchell-at wants to merge 1 commit intomicrosoft:mainfrom
MichaelMitchell-at:no_combine_file_pattern_regexes
Closed

Do not merge file patterns into a single regular expression#61104
MichaelMitchell-at wants to merge 1 commit intomicrosoft:mainfrom
MichaelMitchell-at:no_combine_file_pattern_regexes

Conversation

@MichaelMitchell-at
Copy link
Copy Markdown
Contributor

@MichaelMitchell-at MichaelMitchell-at commented Feb 3, 2025

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_repro

Before:

$ 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

@MichaelMitchell-at
Copy link
Copy Markdown
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.

@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Mar 24, 2026
@typescript-bot
Copy link
Copy Markdown
Collaborator

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Performance degrades the more wildcards that are contained in TSConfig include or exclude patterns

3 participants