Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); (function(){ try { var __m = "github.com"; var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length \u003e 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Merge 'decorators' into 'modifiers' on various nodes - #49089

Merged
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers
Jun 10, 2022
Merged

Merge 'decorators' into 'modifiers' on various nodes#49089
Ron Buckton (rbuckton) merged 9 commits into
mainfrom
mergeDecoratorsAndModifiers

Conversation

@rbuckton

@rbucktonRon Buckton (rbuckton) commented May 12, 2022

Copy link
Copy Markdown
Contributor

This merges the decorators field on Node into the modifiers field in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after the export and default keywords, which is incompatible with our current AST and NodeFactory methods.

To avoid a large amount of complex overloads, we've currently opted to change the decorators parameter on various NodeFactory API methods to only accept null (which we generally don't use in the compiler). Calling the existing NodeFactory API methods with a value for decorators that is not null will result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove the decorators parameter entirely until 5.0.

NOTE: After some consideration, I've amended the approach above to remove the decorators parameter entirely from the main API and only support it through overloads via deprecatedCompat.

This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.

NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 12, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here.

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55efCompareMay 14, 2022 01:58
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 14, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,615k (± 0.01%)357,335k (± 0.02%)-280k (- 0.08%)357,079k357,522k
Parse Time2.06s (± 0.58%)2.09s (± 0.66%)+0.03s (+ 1.45%)2.06s2.14s
Bind Time0.86s (± 0.96%)0.89s (± 0.42%)+0.02s (+ 2.43%)0.88s0.89s
Check Time5.84s (± 0.60%)5.86s (± 0.62%)+0.02s (+ 0.33%)5.81s5.98s
Emit Time6.01s (± 0.61%)5.99s (± 0.78%)-0.02s (- 0.25%)5.93s6.17s
Total Time14.78s (± 0.41%)14.84s (± 0.64%)+0.06s (+ 0.39%)14.70s15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,937k (± 0.03%)205,850k (± 0.04%)-87k (- 0.04%)205,713k206,039k
Parse Time0.83s (± 0.91%)0.83s (± 0.72%)0.00s ( 0.00%)0.82s0.85s
Bind Time0.52s (± 1.49%)0.53s (± 1.10%)+0.01s (+ 1.54%)0.52s0.54s
Check Time7.89s (± 0.30%)7.96s (± 0.42%)+0.08s (+ 0.99%)7.90s8.03s
Emit Time2.47s (± 0.95%)2.49s (± 0.98%)+0.02s (+ 0.81%)2.44s2.54s
Total Time11.71s (± 0.27%)11.82s (± 0.33%)+0.11s (+ 0.94%)11.73s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,805k (± 0.03%)343,532k (± 0.03%)-273k (- 0.08%)343,308k343,740k
Parse Time1.58s (± 0.38%)1.59s (± 0.66%)+0.01s (+ 0.32%)1.57s1.61s
Bind Time0.76s (± 0.68%)0.77s (± 0.64%)+0.01s (+ 0.92%)0.76s0.78s
Check Time5.82s (± 0.28%)5.90s (± 0.37%)+0.08s (+ 1.37%)5.86s5.98s
Emit Time3.23s (± 0.90%)3.23s (± 0.96%)-0.01s (- 0.19%)3.17s3.31s
Total Time11.40s (± 0.35%)11.48s (± 0.27%)+0.08s (+ 0.71%)11.43s11.56s
TFS - node (v10.16.3, x64)
Memory used305,450k (± 0.02%)304,962k (± 0.01%)-488k (- 0.16%)304,884k305,061k
Parse Time1.28s (± 0.52%)1.29s (± 0.48%)+0.01s (+ 0.62%)1.28s1.30s
Bind Time0.71s (± 0.48%)0.72s (± 0.62%)+0.01s (+ 2.12%)0.71s0.73s
Check Time5.26s (± 0.68%)5.31s (± 0.45%)+0.05s (+ 0.95%)5.24s5.35s
Emit Time3.43s (± 0.93%)3.39s (± 0.67%)-0.03s (- 0.96%)3.32s3.43s
Total Time10.67s (± 0.51%)10.71s (± 0.31%)+0.04s (+ 0.39%)10.63s10.77s
material-ui - node (v10.16.3, x64)
Memory used468,556k (± 0.01%)468,429k (± 0.01%)-127k (- 0.03%)468,294k468,501k
Parse Time1.83s (± 0.48%)1.85s (± 0.63%)+0.01s (+ 0.65%)1.83s1.88s
Bind Time0.67s (± 1.04%)0.70s (± 1.09%)+0.02s (+ 3.58%)0.67s0.71s
Check Time14.34s (± 0.30%)14.34s (± 0.60%)+0.00s (+ 0.01%)14.20s14.58s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.85s (± 0.25%)16.88s (± 0.55%)+0.04s (+ 0.21%)16.72s17.13s
xstate - node (v10.16.3, x64)
Memory used571,881k (± 0.01%)571,614k (± 0.01%)-267k (- 0.05%)571,424k571,781k
Parse Time2.59s (± 0.26%)2.61s (± 0.28%)+0.03s (+ 0.97%)2.60s2.63s
Bind Time1.01s (± 0.79%)1.02s (± 0.58%)+0.02s (+ 1.59%)1.01s1.03s
Check Time1.53s (± 0.70%)1.53s (± 0.29%)+0.00s (+ 0.13%)1.52s1.54s
Emit Time0.07s (± 3.14%)0.07s (± 3.14%)0.00s ( 0.00%)0.07s0.08s
Total Time5.19s (± 0.32%)5.23s (± 0.17%)+0.04s (+ 0.71%)5.21s5.25s
Angular - node (v12.1.0, x64)
Memory used335,386k (± 0.01%)335,043k (± 0.02%)-343k (- 0.10%)334,854k335,130k
Parse Time2.07s (± 0.74%)2.09s (± 0.51%)+0.02s (+ 1.11%)2.07s2.12s
Bind Time0.82s (± 0.60%)0.86s (± 0.40%)+0.03s (+ 4.00%)0.85s0.86s
Check Time5.63s (± 0.56%)5.70s (± 0.49%)+0.07s (+ 1.17%)5.64s5.77s
Emit Time6.21s (± 0.56%)6.24s (± 0.40%)+0.03s (+ 0.50%)6.17s6.29s
Total Time14.73s (± 0.39%)14.88s (± 0.18%)+0.15s (+ 1.00%)14.83s14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,601k (± 0.03%)193,472k (± 0.08%)-129k (- 0.07%)192,836k193,643k
Parse Time0.84s (± 1.33%)0.83s (± 0.59%)-0.00s (- 0.24%)0.83s0.85s
Bind Time0.53s (± 0.42%)0.55s (± 0.91%)+0.01s (+ 2.64%)0.53s0.55s
Check Time7.42s (± 0.59%)7.45s (± 0.41%)+0.03s (+ 0.42%)7.39s7.55s
Emit Time2.53s (± 1.17%)2.52s (± 0.90%)-0.01s (- 0.47%)2.46s2.56s
Total Time11.31s (± 0.54%)11.34s (± 0.42%)+0.03s (+ 0.28%)11.25s11.50s
Monaco - node (v12.1.0, x64)
Memory used326,867k (± 0.01%)326,639k (± 0.02%)-229k (- 0.07%)326,522k326,739k
Parse Time1.55s (± 0.52%)1.57s (± 0.53%)+0.01s (+ 0.90%)1.55s1.58s
Bind Time0.73s (± 0.46%)0.77s (± 0.78%)+0.03s (+ 4.50%)0.75s0.78s
Check Time5.65s (± 0.33%)5.72s (± 0.36%)+0.07s (+ 1.31%)5.68s5.79s
Emit Time3.27s (± 0.63%)3.28s (± 0.62%)+0.01s (+ 0.37%)3.23s3.32s
Total Time11.20s (± 0.27%)11.33s (± 0.34%)+0.13s (+ 1.17%)11.23s11.44s
TFS - node (v12.1.0, x64)
Memory used290,144k (± 0.02%)289,588k (± 0.03%)-556k (- 0.19%)289,443k289,789k
Parse Time1.30s (± 0.63%)1.30s (± 0.65%)-0.00s (- 0.38%)1.28s1.32s
Bind Time0.73s (± 1.43%)0.75s (± 1.00%)+0.02s (+ 2.61%)0.74s0.77s
Check Time5.24s (± 0.47%)5.27s (± 0.47%)+0.03s (+ 0.59%)5.23s5.33s
Emit Time3.52s (± 0.58%)3.50s (± 0.75%)-0.02s (- 0.60%)3.46s3.59s
Total Time10.79s (± 0.23%)10.82s (± 0.40%)+0.03s (+ 0.25%)10.75s10.96s
material-ui - node (v12.1.0, x64)
Memory used447,385k (± 0.07%)447,266k (± 0.07%)-119k (- 0.03%)446,075k447,527k
Parse Time1.82s (± 0.64%)1.84s (± 0.38%)+0.01s (+ 0.77%)1.83s1.86s
Bind Time0.65s (± 0.80%)0.67s (± 1.08%)+0.02s (+ 3.23%)0.66s0.69s
Check Time12.96s (± 0.98%)13.00s (± 0.69%)+0.05s (+ 0.36%)12.85s13.26s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.43s (± 0.85%)15.52s (± 0.63%)+0.08s (+ 0.52%)15.34s15.79s
xstate - node (v12.1.0, x64)
Memory used537,498k (± 0.02%)537,508k (± 0.02%)+10k (+ 0.00%)537,363k537,739k
Parse Time2.53s (± 0.38%)2.55s (± 0.81%)+0.02s (+ 0.83%)2.51s2.61s
Bind Time1.03s (± 0.81%)1.02s (± 1.34%)-0.00s (- 0.29%)1.00s1.06s
Check Time1.47s (± 0.40%)1.48s (± 0.68%)+0.00s (+ 0.07%)1.46s1.50s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.10s (± 0.17%)5.12s (± 0.44%)+0.02s (+ 0.35%)5.06s5.16s
Angular - node (v14.15.1, x64)
Memory used333,614k (± 0.01%)333,231k (± 0.01%)-383k (- 0.11%)333,184k333,292k
Parse Time2.05s (± 0.28%)2.06s (± 0.72%)+0.01s (+ 0.54%)2.04s2.10s
Bind Time0.87s (± 0.79%)0.91s (± 0.89%)+0.05s (+ 5.43%)0.89s0.93s
Check Time5.63s (± 0.28%)5.69s (± 0.42%)+0.06s (+ 1.03%)5.66s5.76s
Emit Time6.31s (± 0.83%)6.29s (± 0.45%)-0.02s (- 0.27%)6.24s6.36s
Total Time14.86s (± 0.35%)14.96s (± 0.33%)+0.10s (+ 0.65%)14.87s15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,281k (± 0.02%)191,986k (± 0.02%)-294k (- 0.15%)191,850k192,033k
Parse Time0.85s (± 0.40%)0.85s (± 0.43%)-0.01s (- 0.82%)0.84s0.85s
Bind Time0.56s (± 0.65%)0.58s (± 1.03%)+0.02s (+ 3.60%)0.57s0.59s
Check Time7.54s (± 0.51%)7.60s (± 0.72%)+0.06s (+ 0.82%)7.48s7.73s
Emit Time2.51s (± 0.65%)2.49s (± 0.83%)-0.02s (- 0.92%)2.44s2.53s
Total Time11.46s (± 0.38%)11.51s (± 0.48%)+0.05s (+ 0.46%)11.39s11.61s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.01%)325,469k (± 0.00%)-151k (- 0.05%)325,450k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.51%)-0.00s (- 0.25%)1.55s1.59s
Bind Time0.77s (± 0.29%)0.80s (± 0.46%)+0.03s (+ 3.24%)0.79s0.80s
Check Time5.53s (± 0.38%)5.60s (± 0.65%)+0.08s (+ 1.41%)5.51s5.70s
Emit Time3.33s (± 0.58%)3.36s (± 1.07%)+0.02s (+ 0.72%)3.29s3.45s
Total Time11.21s (± 0.28%)11.33s (± 0.44%)+0.12s (+ 1.06%)11.23s11.43s
TFS - node (v14.15.1, x64)
Memory used289,109k (± 0.01%)288,575k (± 0.01%)-533k (- 0.18%)288,518k288,633k
Parse Time1.37s (± 1.64%)1.32s (± 0.64%)🟩-0.05s (- 3.58%)1.30s1.34s
Bind Time0.72s (± 0.72%)0.76s (± 1.36%)+0.04s (+ 5.98%)0.73s0.78s
Check Time5.20s (± 0.42%)5.23s (± 0.43%)+0.03s (+ 0.58%)5.17s5.26s
Emit Time3.51s (± 1.98%)3.51s (± 2.07%)+0.00s (+ 0.03%)3.39s3.68s
Total Time10.79s (± 0.70%)10.82s (± 0.69%)+0.02s (+ 0.22%)10.67s11.01s
material-ui - node (v14.15.1, x64)
Memory used445,680k (± 0.04%)445,679k (± 0.01%)-1k (- 0.00%)445,600k445,753k
Parse Time1.87s (± 0.36%)1.88s (± 0.44%)+0.01s (+ 0.64%)1.87s1.91s
Bind Time0.69s (± 0.52%)0.73s (± 1.32%)+0.03s (+ 4.47%)0.71s0.75s
Check Time13.07s (± 0.51%)13.15s (± 0.85%)+0.08s (+ 0.64%)12.96s13.49s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.63s (± 0.42%)15.76s (± 0.74%)+0.13s (+ 0.84%)15.57s16.12s
xstate - node (v14.15.1, x64)
Memory used535,271k (± 0.01%)535,191k (± 0.00%)-80k (- 0.01%)535,138k535,244k
Parse Time2.58s (± 0.41%)2.59s (± 0.43%)+0.01s (+ 0.39%)2.56s2.62s
Bind Time1.14s (± 0.86%)1.14s (± 0.93%)+0.00s (+ 0.18%)1.12s1.18s
Check Time1.52s (± 0.46%)1.52s (± 0.54%)+0.00s (+ 0.07%)1.50s1.54s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.32s (± 0.31%)5.33s (± 0.26%)+0.01s (+ 0.26%)5.30s5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory2 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2022

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here.

Update: The results are in!

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749CompareMay 21, 2022 06:28
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metricmain49089DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used357,680k (± 0.02%)357,392k (± 0.01%)-288k (- 0.08%)357,325k357,492k
Parse Time2.07s (± 0.36%)2.10s (± 0.32%)+0.03s (+ 1.45%)2.08s2.11s
Bind Time0.87s (± 0.79%)0.88s (± 0.41%)+0.02s (+ 2.08%)0.88s0.89s
Check Time5.83s (± 0.51%)5.83s (± 0.38%)+0.01s (+ 0.10%)5.77s5.87s
Emit Time6.01s (± 0.51%)5.99s (± 0.51%)-0.02s (- 0.27%)5.95s6.08s
Total Time14.76s (± 0.32%)14.80s (± 0.31%)+0.04s (+ 0.26%)14.73s14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,981k (± 0.03%)205,739k (± 0.03%)-241k (- 0.12%)205,574k205,828k
Parse Time0.84s (± 0.66%)0.84s (± 1.12%)+0.00s (+ 0.24%)0.82s0.86s
Bind Time0.52s (± 1.47%)0.53s (± 1.42%)+0.01s (+ 2.13%)0.51s0.55s
Check Time7.91s (± 0.56%)7.98s (± 0.45%)+0.07s (+ 0.87%)7.88s8.03s
Emit Time2.51s (± 1.17%)2.49s (± 0.69%)-0.02s (- 0.64%)2.45s2.53s
Total Time11.78s (± 0.49%)11.84s (± 0.27%)+0.06s (+ 0.54%)11.75s11.89s
Monaco - node (v10.16.3, x64)
Memory used343,851k (± 0.02%)343,529k (± 0.02%)-322k (- 0.09%)343,361k343,657k
Parse Time1.59s (± 0.49%)1.60s (± 0.36%)+0.01s (+ 0.75%)1.59s1.61s
Bind Time0.75s (± 0.77%)0.76s (± 0.39%)+0.01s (+ 1.20%)0.76s0.77s
Check Time5.81s (± 0.39%)5.89s (± 0.52%)+0.08s (+ 1.33%)5.83s5.96s
Emit Time3.23s (± 0.80%)3.23s (± 0.60%)-0.00s (- 0.12%)3.19s3.27s
Total Time11.39s (± 0.33%)11.48s (± 0.34%)+0.09s (+ 0.82%)11.38s11.57s
TFS - node (v10.16.3, x64)
Memory used305,518k (± 0.02%)304,931k (± 0.02%)-588k (- 0.19%)304,714k305,027k
Parse Time1.29s (± 0.51%)1.29s (± 0.64%)+0.00s (+ 0.31%)1.28s1.31s
Bind Time0.72s (± 0.69%)0.72s (± 0.31%)+0.00s (+ 0.70%)0.72s0.73s
Check Time5.27s (± 0.28%)5.29s (± 0.67%)+0.02s (+ 0.42%)5.21s5.37s
Emit Time3.45s (± 0.98%)3.42s (± 0.88%)-0.03s (- 0.81%)3.35s3.49s
Total Time10.73s (± 0.34%)10.73s (± 0.50%)+0.00s (+ 0.03%)10.62s10.85s
material-ui - node (v10.16.3, x64)
Memory used468,562k (± 0.02%)468,396k (± 0.01%)-166k (- 0.04%)468,306k468,555k
Parse Time1.84s (± 0.41%)1.84s (± 0.65%)+0.00s (+ 0.16%)1.82s1.88s
Bind Time0.67s (± 1.77%)0.69s (± 0.89%)+0.02s (+ 2.83%)0.67s0.70s
Check Time14.32s (± 0.64%)14.36s (± 0.29%)+0.04s (+ 0.31%)14.28s14.44s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.82s (± 0.56%)16.89s (± 0.24%)+0.06s (+ 0.39%)16.81s16.98s
xstate - node (v10.16.3, x64)
Memory used575,259k (± 1.32%)575,021k (± 1.31%)-238k (- 0.04%)571,405k605,452k
Parse Time2.59s (± 0.26%)2.60s (± 0.18%)+0.02s (+ 0.62%)2.59s2.61s
Bind Time1.00s (± 0.47%)1.02s (± 1.43%)+0.02s (+ 1.79%)1.00s1.07s
Check Time1.53s (± 0.73%)1.52s (± 0.46%)-0.01s (- 0.91%)1.50s1.53s
Emit Time0.07s (± 4.13%)0.07s (± 0.00%)-0.00s (- 2.78%)0.07s0.07s
Total Time5.20s (± 0.23%)5.21s (± 0.34%)+0.02s (+ 0.31%)5.20s5.28s
Angular - node (v12.1.0, x64)
Memory used335,407k (± 0.02%)335,059k (± 0.02%)-349k (- 0.10%)334,879k335,250k
Parse Time2.07s (± 0.67%)2.09s (± 0.58%)+0.02s (+ 0.82%)2.06s2.12s
Bind Time0.82s (± 0.60%)0.85s (± 0.90%)+0.02s (+ 2.55%)0.84s0.87s
Check Time5.62s (± 0.47%)5.68s (± 0.46%)+0.06s (+ 1.03%)5.63s5.74s
Emit Time6.25s (± 0.55%)6.25s (± 0.59%)+0.00s (+ 0.08%)6.17s6.37s
Total Time14.76s (± 0.37%)14.86s (± 0.23%)+0.10s (+ 0.66%)14.79s14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,570k (± 0.11%)193,383k (± 0.12%)-187k (- 0.10%)192,870k193,759k
Parse Time0.84s (± 1.05%)0.84s (± 0.84%)+0.00s (+ 0.24%)0.83s0.86s
Bind Time0.53s (± 0.90%)0.54s (± 0.88%)+0.02s (+ 3.04%)0.53s0.55s
Check Time7.40s (± 0.34%)7.42s (± 0.57%)+0.02s (+ 0.27%)7.32s7.52s
Emit Time2.51s (± 0.95%)2.51s (± 0.63%)+0.00s (+ 0.04%)2.47s2.55s
Total Time11.28s (± 0.27%)11.32s (± 0.48%)+0.04s (+ 0.36%)11.22s11.46s
Monaco - node (v12.1.0, x64)
Memory used326,861k (± 0.02%)326,604k (± 0.02%)-256k (- 0.08%)326,460k326,787k
Parse Time1.56s (± 0.53%)1.56s (± 0.88%)+0.01s (+ 0.64%)1.55s1.61s
Bind Time0.74s (± 0.75%)0.76s (± 0.79%)+0.01s (+ 1.89%)0.74s0.77s
Check Time5.66s (± 0.57%)5.71s (± 0.54%)+0.05s (+ 0.87%)5.65s5.79s
Emit Time3.28s (± 1.07%)3.27s (± 0.77%)-0.00s (- 0.09%)3.23s3.34s
Total Time11.23s (± 0.53%)11.30s (± 0.43%)+0.07s (+ 0.63%)11.22s11.43s
TFS - node (v12.1.0, x64)
Memory used290,145k (± 0.02%)289,582k (± 0.02%)-563k (- 0.19%)289,430k289,720k
Parse Time1.30s (± 0.77%)1.30s (± 0.38%)-0.00s (- 0.08%)1.29s1.31s
Bind Time0.73s (± 0.68%)0.75s (± 1.71%)+0.03s (+ 3.72%)0.74s0.80s
Check Time5.20s (± 0.35%)5.23s (± 0.29%)+0.03s (+ 0.63%)5.20s5.28s
Emit Time3.51s (± 0.66%)3.49s (± 0.47%)-0.03s (- 0.80%)3.46s3.54s
Total Time10.73s (± 0.35%)10.76s (± 0.13%)+0.03s (+ 0.28%)10.74s10.80s
material-ui - node (v12.1.0, x64)
Memory used447,477k (± 0.02%)447,405k (± 0.01%)-72k (- 0.02%)447,295k447,531k
Parse Time1.83s (± 0.57%)1.84s (± 0.66%)+0.01s (+ 0.60%)1.82s1.87s
Bind Time0.65s (± 0.46%)0.68s (± 0.50%)+0.02s (+ 3.83%)0.67s0.68s
Check Time12.93s (± 0.50%)12.94s (± 0.56%)+0.01s (+ 0.04%)12.83s13.17s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.41s (± 0.44%)15.46s (± 0.50%)+0.04s (+ 0.28%)15.32s15.70s
xstate - node (v12.1.0, x64)
Memory used540,794k (± 1.37%)537,521k (± 0.01%)-3,273k (- 0.61%)537,371k537,681k
Parse Time2.52s (± 0.38%)2.55s (± 0.35%)+0.02s (+ 0.87%)2.52s2.56s
Bind Time1.03s (± 0.78%)1.02s (± 1.17%)-0.01s (- 0.97%)0.99s1.05s
Check Time1.47s (± 0.57%)1.48s (± 0.65%)+0.01s (+ 0.82%)1.47s1.51s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time5.09s (± 0.40%)5.12s (± 0.23%)+0.03s (+ 0.51%)5.09s5.15s
Angular - node (v14.15.1, x64)
Memory used333,645k (± 0.01%)333,180k (± 0.00%)-465k (- 0.14%)333,145k333,205k
Parse Time2.04s (± 0.59%)2.06s (± 0.35%)+0.02s (+ 0.93%)2.05s2.08s
Bind Time0.87s (± 0.42%)0.88s (± 0.66%)+0.02s (+ 1.96%)0.87s0.89s
Check Time5.64s (± 0.41%)5.65s (± 0.38%)+0.01s (+ 0.21%)5.61s5.71s
Emit Time6.29s (± 0.66%)6.33s (± 0.86%)+0.03s (+ 0.49%)6.22s6.48s
Total Time14.84s (± 0.31%)14.92s (± 0.44%)+0.08s (+ 0.53%)14.78s15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,172k (± 0.07%)192,027k (± 0.01%)-145k (- 0.08%)191,967k192,093k
Parse Time0.85s (± 0.73%)0.85s (± 0.70%)-0.00s (- 0.35%)0.84s0.86s
Bind Time0.56s (± 0.71%)0.57s (± 0.60%)+0.01s (+ 1.07%)0.56s0.57s
Check Time7.51s (± 0.66%)7.52s (± 0.36%)+0.01s (+ 0.09%)7.47s7.60s
Emit Time2.52s (± 1.71%)2.49s (± 0.52%)-0.03s (- 1.31%)2.47s2.52s
Total Time11.44s (± 0.71%)11.42s (± 0.25%)-0.02s (- 0.17%)11.38s11.49s
Monaco - node (v14.15.1, x64)
Memory used325,621k (± 0.00%)325,435k (± 0.01%)-186k (- 0.06%)325,398k325,484k
Parse Time1.57s (± 0.46%)1.57s (± 0.59%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.78s (± 0.77%)0.78s (± 0.43%)+0.01s (+ 0.90%)0.78s0.79s
Check Time5.56s (± 0.63%)5.58s (± 0.27%)+0.02s (+ 0.38%)5.56s5.64s
Emit Time3.33s (± 0.59%)3.34s (± 0.62%)+0.01s (+ 0.42%)3.31s3.41s
Total Time11.23s (± 0.37%)11.28s (± 0.18%)+0.05s (+ 0.46%)11.24s11.34s
TFS - node (v14.15.1, x64)
Memory used289,112k (± 0.01%)288,567k (± 0.01%)-544k (- 0.19%)288,533k288,599k
Parse Time1.36s (± 1.15%)1.32s (± 1.04%)-0.04s (- 2.65%)1.30s1.36s
Bind Time0.72s (± 0.83%)0.76s (± 1.60%)+0.03s (+ 4.28%)0.74s0.80s
Check Time5.21s (± 0.41%)5.22s (± 0.31%)+0.01s (+ 0.21%)5.19s5.26s
Emit Time3.48s (± 2.08%)3.49s (± 1.49%)+0.02s (+ 0.43%)3.44s3.66s
Total Time10.76s (± 0.78%)10.78s (± 0.63%)+0.02s (+ 0.19%)10.68s10.96s
material-ui - node (v14.15.1, x64)
Memory used445,638k (± 0.06%)445,594k (± 0.04%)-45k (- 0.01%)444,855k445,731k
Parse Time1.88s (± 0.41%)1.89s (± 0.59%)+0.01s (+ 0.53%)1.87s1.92s
Bind Time0.70s (± 0.53%)0.72s (± 1.08%)+0.02s (+ 3.45%)0.71s0.74s
Check Time13.09s (± 0.76%)13.00s (± 0.28%)-0.08s (- 0.65%)12.93s13.08s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.66s (± 0.66%)15.61s (± 0.25%)-0.05s (- 0.33%)15.52s15.67s
xstate - node (v14.15.1, x64)
Memory used535,251k (± 0.01%)535,179k (± 0.00%)-72k (- 0.01%)535,109k535,228k
Parse Time2.58s (± 0.32%)2.61s (± 0.48%)+0.02s (+ 0.89%)2.58s2.64s
Bind Time1.14s (± 0.43%)1.15s (± 0.76%)+0.02s (+ 1.50%)1.14s1.18s
Check Time1.52s (± 0.44%)1.52s (± 0.79%)+0.00s (+ 0.20%)1.49s1.55s
Emit Time0.07s (± 0.00%)0.07s (± 4.13%)+0.00s (+ 2.86%)0.07s0.08s
Total Time5.31s (± 0.19%)5.35s (± 0.42%)+0.04s (+ 0.70%)5.31s5.42s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current4908910
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 01f9749 to 4d3805fCompareMay 23, 2022 06:10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.

Also, is performance the same? I remember you saying something about it in earlier drafts.

Comment threadsrc/services/codefixes/convertToAsyncFunction.ts Outdated
Comment threadsrc/testRunner/tsconfig.json Outdated
Comment threadsrc/harness/tsconfig.json
Comment threadsrc/services/breakpoints.ts
Comment threadsrc/compiler/emitter.ts Outdated
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate.

# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/transformers/ts.ts
#	src/compiler/utilities.ts
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6fCompareJune 5, 2022 03:32
@rbuckton
Ron Buckton (rbuckton)force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576CompareJune 6, 2022 23:24
@rbuckton
Ron Buckton (rbuckton) deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton

Copy link
Copy Markdown
ContributorAuthor

Got slightly ahead of myself with the merge, but I've fixed the test failure in main.

@lvelden

Copy link
Copy Markdown

I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8?

@bradzacher

Copy link
Copy Markdown
Contributor

Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change.

From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken.

ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 9, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Update tsconfig-paths hook to be compatible with how
`updateExportDeclaration` now works in typescript 5.
This is from:
microsoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request Apr 15, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
ttshivers (ttshivers) added a commit to ttshivers/nest-cli that referenced this pull request May 17, 2023
Decorators are now placed on `modifiers` on TypeScript's syntax trees.
Passing decorators separately has been deprecated since v4.8 and removed
completely in v5.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Philipp Fritsche (ph-fritsche) added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@rbuckton@typescript-bot@lvelden@bradzacher@sandersn