Skip to content

Skip declaration emit without a prior signature - #4726

Draft
Jake Bailey (jakebailey) wants to merge 2 commits into
mainfrom
jabaile/tsgo-incremental-skip-provisional-importer-signatures
Draft

Skip declaration emit without a prior signature#4726
Jake Bailey (jakebailey) wants to merge 2 commits into
mainfrom
jabaile/tsgo-incremental-skip-provisional-importer-signatures

Conversation

@jakebailey

Copy link
Copy Markdown
Member

WIP

Cover an incremental noEmit build where a change propagates through a re-export and its importer after source versions were stored as signatures.
When an unchanged importer has signature == version, there is no previous declaration signature available for comparison.

Computing one may allow propagation to stop, but requires declaration emit. Skip that refinement and conservatively continue through the importer graph instead.

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.

Pull request overview

Optimizes incremental builds by avoiding unnecessary declaration-signature emission when no prior declaration signature exists.

Changes:

  • Conservatively propagates affected files without computing missing declaration signatures.
  • Adds re-export propagation coverage.
  • Updates incremental, no-emit, build, and watch baselines.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/execute/incremental/affectedfileshandler.go Skips unnecessary declaration-signature computation.
internal/execute/tsctests/tsc_test.go Adds re-export propagation scenario.
testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js Records the new scenario.
testdata/baselines/reference/tsc/incremental/const-enums.js Updates const-enum incremental output.
testdata/baselines/reference/tsc/incremental/const-enums-aliased.js Updates aliased const-enum output.
testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js Updates cross-file alias output.
testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js Updates class-expression incremental output.
testdata/baselines/reference/tsc/noEmit/changes-incremental.js Updates no-emit incremental state.
testdata/baselines/reference/tsc/noEmit/changes-with-initial-noEmit-incremental.js Updates initial no-emit state.
testdata/baselines/reference/tsbuild/noEmit/changes-incremental.js Updates build-mode no-emit output.
testdata/baselines/reference/tsbuild/noEmit/changes-with-initial-noEmit-incremental.js Updates initial build-mode no-emit output.
testdata/baselines/reference/tscWatch/commandLineWatch/watch-handles-file-rapidly-recreated.js Removes redundant watch signature computation.
testdata/baselines/reference/tscWatch/commandLineWatch/watch-detects-change-in-symlinked-node_modules-file.js Updates symlink watch signature behavior.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@jakebailey

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) perf test this

@typescript-automation

typescript-automation Bot commented Aug 14, 2026

Copy link
Copy Markdown

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this ✅ Started 👀 Results

@typescript-automation

Copy link
Copy Markdown

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - native
Errors 41 41 ~ ~ ~ p=1.000 n=12
Symbols 115,480 115,480 ~ ~ ~ p=1.000 n=12
Types 96,945 96,945 ~ ~ ~ p=1.000 n=12
Memory Used 148,959k (± 0.61%) 149,132k (± 0.38%) ~ 147,430k 150,176k p=0.799 n=12
Memory Allocs 2,247,461 (± 0.01%) 2,247,499 (± 0.01%) ~ 2,247,224 2,247,835 p=0.944 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.050s (± 3.32%) 0.051s (± 2.96%) ~ 0.046s 0.055s p=0.636 n=12
Bind Time 0.014s (±10.34%) 0.017s (±16.37%) ~ 0.012s 0.024s p=0.293 n=12
Check Time 0.616s (± 1.14%) 0.619s (± 0.89%) ~ 0.608s 0.633s p=0.235 n=12
Emit Time 0.323s (± 1.70%) 0.330s (± 2.81%) ~ 0.309s 0.366s p=0.370 n=12
Total Time 1.011s (± 0.82%) 1.024s (± 1.16%) +0.013s (+ 1.26%) 1.001s 1.079s p=0.040 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 847,355 (± 0.06%) 846,832 (± 0.11%) ~ 844,947 848,469 p=0.514 n=12
Types 249,912 (± 0.00%) 249,913 (± 0.00%) ~ 249,910 249,922 p=0.768 n=12
Memory Used 793,551k (± 0.08%) 793,034k (± 0.07%) ~ 791,823k 795,026k p=0.178 n=12
Memory Allocs 13,044,731 (± 0.10%) 13,034,685 (± 0.01%) ~ 13,031,182 13,041,216 p=0.713 n=12
Config Time 0.020s (± 0.91%) 0.020s (± 0.91%) ~ 0.019s 0.020s p=1.000 n=12
Parse Time 0.352s (± 1.84%) 0.348s (± 2.03%) ~ 0.332s 0.365s p=0.272 n=12
Bind Time 0.075s (± 5.34%) 0.084s (±17.11%) ~ 0.073s 0.145s p=0.460 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.983s (± 0.69%) 1.996s (± 1.32%) ~ 1.951s 2.096s p=0.745 n=12
Total Time 2.450s (± 0.80%) 2.468s (± 1.56%) ~ 2.398s 2.596s p=0.876 n=12
mui-docs - native
Errors 11,279 (± 0.02%) 11,278 (± 0.02%) ~ 11,268 11,282 p=0.633 n=12
Symbols 4,230,792 4,230,792 ~ ~ ~ p=1.000 n=12
Types 1,591,020 1,591,020 ~ ~ ~ p=1.000 n=12
Memory Used 4,852,380k (± 0.03%) 4,851,890k (± 0.03%) ~ 4,848,448k 4,856,976k p=0.671 n=12
Memory Allocs 48,396,628 (± 0.04%) 48,399,697 (± 0.03%) ~ 48,361,766 48,441,930 p=0.671 n=12
Config Time 0.019s 0.019s ~ ~ ~ p=1.000 n=12
Parse Time 0.672s (± 2.15%) 0.675s (± 1.14%) ~ 0.649s 0.692s p=0.988 n=12
Bind Time 0.002s (±13.27%) 0.003s (±11.61%) ~ 0.002s 0.003s p=0.220 n=12
Check Time 18.791s (± 0.79%) 18.732s (± 0.65%) ~ 18.340s 19.063s p=0.291 n=12
Emit Time 0.521s (± 0.27%) 0.520s (± 0.32%) ~ 0.517s 0.525s p=0.311 n=12
Total Time 20.934s (± 0.78%) 20.870s (± 0.71%) ~ 20.375s 21.218s p=0.291 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,394,411 1,394,411 ~ ~ ~ p=1.000 n=12
Types 443,627 443,627 ~ ~ ~ p=1.000 n=12
Memory Used 1,642,250k (± 0.23%) 1,642,450k (± 0.24%) ~ 1,632,887k 1,652,627k p=0.887 n=12
Memory Allocs 96,906,331 (± 0.03%) 96,915,204 (± 0.04%) ~ 96,830,685 97,005,306 p=0.843 n=12
Config Time 0.005s (±10.49%) 0.005s (±10.86%) ~ 0.004s 0.006s p=0.800 n=12
Parse Time 0.236s (± 2.58%) 0.243s (± 3.26%) ~ 0.226s 0.263s p=0.202 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 2.195s (± 0.32%) 2.199s (± 0.38%) ~ 2.179s 2.219s p=0.713 n=12
Emit Time 0.360s (± 3.33%) 0.358s (± 4.28%) ~ 0.304s 0.384s p=1.000 n=12
Total Time 30.567s (± 0.46%) 30.542s (± 0.66%) ~ 30.041s 30.967s p=0.977 n=12
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 337,618 337,618 ~ ~ ~ p=1.000 n=12
Types 198,941 198,941 ~ ~ ~ p=1.000 n=12
Memory Used 319,649k (± 0.03%) 319,633k (± 0.04%) ~ 319,339k 319,909k p=0.887 n=12
Memory Allocs 4,660,967 (± 0.01%) 4,660,769 (± 0.01%) ~ 4,659,563 4,661,847 p=0.799 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.115s (± 4.91%) 0.115s (± 5.15%) ~ 0.098s 0.130s p=0.599 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.061s (± 0.60%) 1.057s (± 0.71%) ~ 1.042s 1.078s p=0.340 n=12
Emit Time 0.148s (±10.00%) 0.154s (±10.79%) ~ 0.114s 0.179s p=0.401 n=12
Total Time 1.379s (± 0.73%) 1.385s (± 0.95%) ~ 1.354s 1.410s p=0.339 n=12
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=12
Symbols 305,341 305,341 ~ ~ ~ p=1.000 n=12
Types 182,038 182,038 ~ ~ ~ p=1.000 n=12
Memory Used 277,323k (± 0.01%) 277,293k (± 0.02%) ~ 277,140k 277,475k p=0.284 n=12
Memory Allocs 1,628,098 (± 0.01%) 1,628,082 (± 0.01%) ~ 1,627,619 1,628,521 p=0.671 n=12
Config Time 0.000s (±217.90%) 0.000s (±113.79%) ~ 0.000s 0.001s p=0.590 n=12
Parse Time 0.100s (± 4.18%) 0.099s (± 3.57%) ~ 0.089s 0.110s p=0.701 n=12
Bind Time 0.038s (±12.08%) 0.036s (±10.96%) ~ 0.029s 0.048s p=0.659 n=12
Check Time 0.844s (± 0.66%) 0.845s (± 0.86%) ~ 0.826s 0.861s p=0.898 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.997s (± 0.67%) 0.994s (± 0.66%) ~ 0.980s 1.012s p=0.702 n=12
vscode - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 7,731,630 7,731,630 ~ ~ ~ p=1.000 n=12
Types 2,662,693 2,662,693 ~ ~ ~ p=1.000 n=12
Memory Used 5,226,807k (± 0.02%) 5,225,541k (± 0.01%) -1,265k (- 0.02%) 5,223,461k 5,227,417k p=0.024 n=12
Memory Allocs 40,503,490 (± 0.03%) 40,498,493 (± 0.04%) ~ 40,486,163 40,566,470 p=0.198 n=12
Config Time 0.061s (± 0.53%) 0.061s (± 0.53%) ~ 0.060s 0.062s p=0.246 n=12
Parse Time 1.614s (± 1.39%) 1.594s (± 2.26%) ~ 1.476s 1.654s p=0.452 n=12
Bind Time 0.333s (± 0.34%) 0.352s (±14.28%) ~ 0.301s 0.604s p=0.500 n=12
Check Time 9.829s (± 0.42%) 9.787s (± 1.04%) ~ 9.330s 9.887s p=0.660 n=12
Emit Time 2.935s (± 0.89%) 3.056s (± 8.39%) ~ 2.870s 4.292s p=0.370 n=12
Total Time 14.850s (± 0.16%) 14.929s (± 1.27%) ~ 14.723s 15.867s p=0.990 n=12
webpack - native
Errors 2 2 ~ ~ ~ p=1.000 n=12
Symbols 1,380 1,380 ~ ~ ~ p=1.000 n=12
Types 340 340 ~ ~ ~ p=1.000 n=12
Memory Used 194,474k (± 0.08%) 194,421k (± 0.05%) ~ 194,225k 194,776k p=0.478 n=12
Memory Allocs 822,664 (± 0.10%) 824,369 (± 0.49%) ~ 820,243 840,807 p=0.410 n=12
Config Time 0.006s 0.006s ~ ~ ~ p=1.000 n=12
Parse Time 0.160s (± 2.68%) 0.160s (± 2.78%) ~ 0.148s 0.171s p=0.809 n=12
Bind Time 0s 0s ~ ~ ~ p=1.000 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.167s (± 2.55%) 0.166s (± 2.66%) ~ 0.155s 0.178s p=0.767 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,020,005 1,020,005 ~ ~ ~ p=1.000 n=12
Types 376,891 376,891 ~ ~ ~ p=1.000 n=12
Memory Used 603,462k (± 0.01%) 603,399k (± 0.01%) ~ 603,204k 603,620k p=0.193 n=12
Memory Allocs 4,748,651 (± 0.03%) 4,748,970 (± 0.02%) ~ 4,746,991 4,752,313 p=0.977 n=12
Config Time 0.003s 0.003s (± 8.64%) ~ 0.002s 0.003s p=0.478 n=12
Parse Time 0.146s (± 3.23%) 0.144s (± 3.38%) ~ 0.136s 0.163s p=0.744 n=12
Bind Time 0.040s (±11.83%) 0.047s (±16.49%) ~ 0.034s 0.073s p=0.136 n=12
Check Time 1.085s (± 0.91%) 1.101s (± 0.77%) +0.016s (+ 1.46%) 1.087s 1.128s p=0.032 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.285s (± 1.32%) 1.306s (± 0.78%) ~ 1.275s 1.330s p=0.060 n=12
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • mui-docs - native
  • strada-build-src - native
  • strada-compiler - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

lsp

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsLSP - native
Req 1 - updateOpen 13ms (±10.85%) 14ms (±12.31%) ~ 12ms 19ms p=0.985 n=12
Req 2 - geterr 580ms (± 0.35%) 577ms (± 0.51%) ~ 568ms 585ms p=0.242 n=12
Req 3 - references 43ms (± 2.74%) 45ms (± 5.10%) 🔻+3ms (+ 6.04%) 39ms 51ms p=0.040 n=12
Req 4 - navto 17ms (± 1.90%) 17ms (± 1.58%) ~ 16ms 18ms p=0.832 n=12
Req 5 - completionInfo count 1,363 1,363 ~ ~ ~ p=1.000 n=12
Req 5 - completionInfo 18ms (± 4.81%) 17ms (± 7.63%) ~ 14ms 19ms p=0.923 n=12
CompilerLSP - native
Req 1 - updateOpen 13ms (± 4.41%) 13ms (± 7.03%) ~ 12ms 16ms p=1.000 n=12
Req 2 - geterr 298ms (± 0.59%) 299ms (± 0.45%) ~ 294ms 302ms p=0.381 n=12
Req 3 - references 53ms (± 2.68%) 51ms (± 4.41%) ~ 46ms 56ms p=0.491 n=12
Req 4 - navto 17ms (± 3.57%) 17ms (± 3.77%) ~ 16ms 20ms p=0.684 n=12
Req 5 - completionInfo count 1,525 1,525 ~ ~ ~ p=1.000 n=12
Req 5 - completionInfo 16ms (± 5.77%) 17ms (± 5.80%) ~ 15ms 19ms p=0.641 n=12
System info unknown
Hosts
  • native
Scenarios
  • CompilerLSP - native
  • Compiler-UnionsLSP - native
  • xstate-main-1-LSP - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
lsp-startup - native
Execution time 4.80ms (±365.10%) 4.80ms (±365.10%) ~ 0.00ms 481.93ms p=0.856 n=1200
tsgo-startup - native
Execution time 5.86ms (±365.10%) 5.90ms (±365.11%) +0.04ms (+ 0.60%) 0.00ms 605.09ms p=0.000 n=1200
System info unknown
Hosts
  • native
Scenarios
  • lsp-startup - native
  • tsgo-startup - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants