Skip to content

fix: avoid repeated root scans in no-op builds - #64898

Merged
Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
a-tarasyuk:fix/64897
Oct 21, 2026
Merged

Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
a-tarasyuk:fix/64897

Conversation

@a-tarasyuk

Copy link
Copy Markdown
Contributor

Fixes #64897


Root files Program files Before After
250 16,314 135.9 ms 58.3 ms
1,000 17,064 357.9 ms 62.5 ms
4,000 20,064 1,243.1 ms 75.7 ms

Copilot AI balanced review requested due to automatic review settings October 21, 2026 10:38
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 21, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Oct 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused optimization preserves existing matching behavior, includes targeted tests, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Addresses #64897 by replacing repeated root scans with direct lookups during no-op build checks.

Changes:

  • Adds root-membership lookup and updates virtual-file detection.
  • Replaces the supported-extension set with a switch.
  • Expands path-matching tests and adds scaling benchmarks.
File Description
tsc/​internal/​execute/​incremental/​buildInfo.go Adds direct root-membership lookup.
tsc/​internal/​execute/​build/​buildtask.go Replaces root scans with path parsing and lookup.
tsc/​internal/​execute/​build/​buildtask_contentmapper_test.go Expands correctness tests and adds benchmarks.
tsc/​internal/​contentmapper/​contentmapper.go Simplifies supported-extension checks.

Review effort: Balanced

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Oct 21, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Oct 21, 2026
Merged via the queue into microsoft:main with commit 98add1b Oct 21, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Oct 21, 2026
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.

tsc -b no-op build ~5x slower in 7.1.0-beta (isContentMapperSupplementalBuildInfoPath scans every root per file)

3 participants