Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 9 commits into from
Jun 10, 2022

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented May 12, 2022

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
Copy link
Collaborator

typescript-bot commented May 12, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 12, 2022

Heya @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
Copy link
Collaborator

typescript-bot commented May 12, 2022

Heya @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
Copy link
Collaborator

typescript-bot commented May 12, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 14, 2022

Heya @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
Copy link
Collaborator

typescript-bot commented May 14, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 14, 2022

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 14, 2022

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

@rbuckton rbuckton force-pushed the mergeDecoratorsAndModifiers branch from ea48336 to 1cf55ef Compare May 14, 2022 01:58
@rbuckton
Copy link
Member Author

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 14, 2022

Heya @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
Collaborator

@rbuckton
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metric main 49089 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 357,615k (± 0.01%) 357,335k (± 0.02%) -280k (- 0.08%) 357,079k 357,522k
Parse Time 2.06s (± 0.58%) 2.09s (± 0.66%) +0.03s (+ 1.45%) 2.06s 2.14s
Bind Time 0.86s (± 0.96%) 0.89s (± 0.42%) +0.02s (+ 2.43%) 0.88s 0.89s
Check Time 5.84s (± 0.60%) 5.86s (± 0.62%) +0.02s (+ 0.33%) 5.81s 5.98s
Emit Time 6.01s (± 0.61%) 5.99s (± 0.78%) -0.02s (- 0.25%) 5.93s 6.17s
Total Time 14.78s (± 0.41%) 14.84s (± 0.64%) +0.06s (+ 0.39%) 14.70s 15.18s
Compiler-Unions - node (v10.16.3, x64)
Memory used 205,937k (± 0.03%) 205,850k (± 0.04%) -87k (- 0.04%) 205,713k 206,039k
Parse Time 0.83s (± 0.91%) 0.83s (± 0.72%) 0.00s ( 0.00%) 0.82s 0.85s
Bind Time 0.52s (± 1.49%) 0.53s (± 1.10%) +0.01s (+ 1.54%) 0.52s 0.54s
Check Time 7.89s (± 0.30%) 7.96s (± 0.42%) +0.08s (+ 0.99%) 7.90s 8.03s
Emit Time 2.47s (± 0.95%) 2.49s (± 0.98%) +0.02s (+ 0.81%) 2.44s 2.54s
Total Time 11.71s (± 0.27%) 11.82s (± 0.33%) +0.11s (+ 0.94%) 11.73s 11.89s
Monaco - node (v10.16.3, x64)
Memory used 343,805k (± 0.03%) 343,532k (± 0.03%) -273k (- 0.08%) 343,308k 343,740k
Parse Time 1.58s (± 0.38%) 1.59s (± 0.66%) +0.01s (+ 0.32%) 1.57s 1.61s
Bind Time 0.76s (± 0.68%) 0.77s (± 0.64%) +0.01s (+ 0.92%) 0.76s 0.78s
Check Time 5.82s (± 0.28%) 5.90s (± 0.37%) +0.08s (+ 1.37%) 5.86s 5.98s
Emit Time 3.23s (± 0.90%) 3.23s (± 0.96%) -0.01s (- 0.19%) 3.17s 3.31s
Total Time 11.40s (± 0.35%) 11.48s (± 0.27%) +0.08s (+ 0.71%) 11.43s 11.56s
TFS - node (v10.16.3, x64)
Memory used 305,450k (± 0.02%) 304,962k (± 0.01%) -488k (- 0.16%) 304,884k 305,061k
Parse Time 1.28s (± 0.52%) 1.29s (± 0.48%) +0.01s (+ 0.62%) 1.28s 1.30s
Bind Time 0.71s (± 0.48%) 0.72s (± 0.62%) +0.01s (+ 2.12%) 0.71s 0.73s
Check Time 5.26s (± 0.68%) 5.31s (± 0.45%) +0.05s (+ 0.95%) 5.24s 5.35s
Emit Time 3.43s (± 0.93%) 3.39s (± 0.67%) -0.03s (- 0.96%) 3.32s 3.43s
Total Time 10.67s (± 0.51%) 10.71s (± 0.31%) +0.04s (+ 0.39%) 10.63s 10.77s
material-ui - node (v10.16.3, x64)
Memory used 468,556k (± 0.01%) 468,429k (± 0.01%) -127k (- 0.03%) 468,294k 468,501k
Parse Time 1.83s (± 0.48%) 1.85s (± 0.63%) +0.01s (+ 0.65%) 1.83s 1.88s
Bind Time 0.67s (± 1.04%) 0.70s (± 1.09%) +0.02s (+ 3.58%) 0.67s 0.71s
Check Time 14.34s (± 0.30%) 14.34s (± 0.60%) +0.00s (+ 0.01%) 14.20s 14.58s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.85s (± 0.25%) 16.88s (± 0.55%) +0.04s (+ 0.21%) 16.72s 17.13s
xstate - node (v10.16.3, x64)
Memory used 571,881k (± 0.01%) 571,614k (± 0.01%) -267k (- 0.05%) 571,424k 571,781k
Parse Time 2.59s (± 0.26%) 2.61s (± 0.28%) +0.03s (+ 0.97%) 2.60s 2.63s
Bind Time 1.01s (± 0.79%) 1.02s (± 0.58%) +0.02s (+ 1.59%) 1.01s 1.03s
Check Time 1.53s (± 0.70%) 1.53s (± 0.29%) +0.00s (+ 0.13%) 1.52s 1.54s
Emit Time 0.07s (± 3.14%) 0.07s (± 3.14%) 0.00s ( 0.00%) 0.07s 0.08s
Total Time 5.19s (± 0.32%) 5.23s (± 0.17%) +0.04s (+ 0.71%) 5.21s 5.25s
Angular - node (v12.1.0, x64)
Memory used 335,386k (± 0.01%) 335,043k (± 0.02%) -343k (- 0.10%) 334,854k 335,130k
Parse Time 2.07s (± 0.74%) 2.09s (± 0.51%) +0.02s (+ 1.11%) 2.07s 2.12s
Bind Time 0.82s (± 0.60%) 0.86s (± 0.40%) +0.03s (+ 4.00%) 0.85s 0.86s
Check Time 5.63s (± 0.56%) 5.70s (± 0.49%) +0.07s (+ 1.17%) 5.64s 5.77s
Emit Time 6.21s (± 0.56%) 6.24s (± 0.40%) +0.03s (+ 0.50%) 6.17s 6.29s
Total Time 14.73s (± 0.39%) 14.88s (± 0.18%) +0.15s (+ 1.00%) 14.83s 14.95s
Compiler-Unions - node (v12.1.0, x64)
Memory used 193,601k (± 0.03%) 193,472k (± 0.08%) -129k (- 0.07%) 192,836k 193,643k
Parse Time 0.84s (± 1.33%) 0.83s (± 0.59%) -0.00s (- 0.24%) 0.83s 0.85s
Bind Time 0.53s (± 0.42%) 0.55s (± 0.91%) +0.01s (+ 2.64%) 0.53s 0.55s
Check Time 7.42s (± 0.59%) 7.45s (± 0.41%) +0.03s (+ 0.42%) 7.39s 7.55s
Emit Time 2.53s (± 1.17%) 2.52s (± 0.90%) -0.01s (- 0.47%) 2.46s 2.56s
Total Time 11.31s (± 0.54%) 11.34s (± 0.42%) +0.03s (+ 0.28%) 11.25s 11.50s
Monaco - node (v12.1.0, x64)
Memory used 326,867k (± 0.01%) 326,639k (± 0.02%) -229k (- 0.07%) 326,522k 326,739k
Parse Time 1.55s (± 0.52%) 1.57s (± 0.53%) +0.01s (+ 0.90%) 1.55s 1.58s
Bind Time 0.73s (± 0.46%) 0.77s (± 0.78%) +0.03s (+ 4.50%) 0.75s 0.78s
Check Time 5.65s (± 0.33%) 5.72s (± 0.36%) +0.07s (+ 1.31%) 5.68s 5.79s
Emit Time 3.27s (± 0.63%) 3.28s (± 0.62%) +0.01s (+ 0.37%) 3.23s 3.32s
Total Time 11.20s (± 0.27%) 11.33s (± 0.34%) +0.13s (+ 1.17%) 11.23s 11.44s
TFS - node (v12.1.0, x64)
Memory used 290,144k (± 0.02%) 289,588k (± 0.03%) -556k (- 0.19%) 289,443k 289,789k
Parse Time 1.30s (± 0.63%) 1.30s (± 0.65%) -0.00s (- 0.38%) 1.28s 1.32s
Bind Time 0.73s (± 1.43%) 0.75s (± 1.00%) +0.02s (+ 2.61%) 0.74s 0.77s
Check Time 5.24s (± 0.47%) 5.27s (± 0.47%) +0.03s (+ 0.59%) 5.23s 5.33s
Emit Time 3.52s (± 0.58%) 3.50s (± 0.75%) -0.02s (- 0.60%) 3.46s 3.59s
Total Time 10.79s (± 0.23%) 10.82s (± 0.40%) +0.03s (+ 0.25%) 10.75s 10.96s
material-ui - node (v12.1.0, x64)
Memory used 447,385k (± 0.07%) 447,266k (± 0.07%) -119k (- 0.03%) 446,075k 447,527k
Parse Time 1.82s (± 0.64%) 1.84s (± 0.38%) +0.01s (+ 0.77%) 1.83s 1.86s
Bind Time 0.65s (± 0.80%) 0.67s (± 1.08%) +0.02s (+ 3.23%) 0.66s 0.69s
Check Time 12.96s (± 0.98%) 13.00s (± 0.69%) +0.05s (+ 0.36%) 12.85s 13.26s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.43s (± 0.85%) 15.52s (± 0.63%) +0.08s (+ 0.52%) 15.34s 15.79s
xstate - node (v12.1.0, x64)
Memory used 537,498k (± 0.02%) 537,508k (± 0.02%) +10k (+ 0.00%) 537,363k 537,739k
Parse Time 2.53s (± 0.38%) 2.55s (± 0.81%) +0.02s (+ 0.83%) 2.51s 2.61s
Bind Time 1.03s (± 0.81%) 1.02s (± 1.34%) -0.00s (- 0.29%) 1.00s 1.06s
Check Time 1.47s (± 0.40%) 1.48s (± 0.68%) +0.00s (+ 0.07%) 1.46s 1.50s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.10s (± 0.17%) 5.12s (± 0.44%) +0.02s (+ 0.35%) 5.06s 5.16s
Angular - node (v14.15.1, x64)
Memory used 333,614k (± 0.01%) 333,231k (± 0.01%) -383k (- 0.11%) 333,184k 333,292k
Parse Time 2.05s (± 0.28%) 2.06s (± 0.72%) +0.01s (+ 0.54%) 2.04s 2.10s
Bind Time 0.87s (± 0.79%) 0.91s (± 0.89%) +0.05s (+ 5.43%) 0.89s 0.93s
Check Time 5.63s (± 0.28%) 5.69s (± 0.42%) +0.06s (+ 1.03%) 5.66s 5.76s
Emit Time 6.31s (± 0.83%) 6.29s (± 0.45%) -0.02s (- 0.27%) 6.24s 6.36s
Total Time 14.86s (± 0.35%) 14.96s (± 0.33%) +0.10s (+ 0.65%) 14.87s 15.07s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,281k (± 0.02%) 191,986k (± 0.02%) -294k (- 0.15%) 191,850k 192,033k
Parse Time 0.85s (± 0.40%) 0.85s (± 0.43%) -0.01s (- 0.82%) 0.84s 0.85s
Bind Time 0.56s (± 0.65%) 0.58s (± 1.03%) +0.02s (+ 3.60%) 0.57s 0.59s
Check Time 7.54s (± 0.51%) 7.60s (± 0.72%) +0.06s (+ 0.82%) 7.48s 7.73s
Emit Time 2.51s (± 0.65%) 2.49s (± 0.83%) -0.02s (- 0.92%) 2.44s 2.53s
Total Time 11.46s (± 0.38%) 11.51s (± 0.48%) +0.05s (+ 0.46%) 11.39s 11.61s
Monaco - node (v14.15.1, x64)
Memory used 325,621k (± 0.01%) 325,469k (± 0.00%) -151k (- 0.05%) 325,450k 325,484k
Parse Time 1.57s (± 0.46%) 1.57s (± 0.51%) -0.00s (- 0.25%) 1.55s 1.59s
Bind Time 0.77s (± 0.29%) 0.80s (± 0.46%) +0.03s (+ 3.24%) 0.79s 0.80s
Check Time 5.53s (± 0.38%) 5.60s (± 0.65%) +0.08s (+ 1.41%) 5.51s 5.70s
Emit Time 3.33s (± 0.58%) 3.36s (± 1.07%) +0.02s (+ 0.72%) 3.29s 3.45s
Total Time 11.21s (± 0.28%) 11.33s (± 0.44%) +0.12s (+ 1.06%) 11.23s 11.43s
TFS - node (v14.15.1, x64)
Memory used 289,109k (± 0.01%) 288,575k (± 0.01%) -533k (- 0.18%) 288,518k 288,633k
Parse Time 1.37s (± 1.64%) 1.32s (± 0.64%) 🟩-0.05s (- 3.58%) 1.30s 1.34s
Bind Time 0.72s (± 0.72%) 0.76s (± 1.36%) +0.04s (+ 5.98%) 0.73s 0.78s
Check Time 5.20s (± 0.42%) 5.23s (± 0.43%) +0.03s (+ 0.58%) 5.17s 5.26s
Emit Time 3.51s (± 1.98%) 3.51s (± 2.07%) +0.00s (+ 0.03%) 3.39s 3.68s
Total Time 10.79s (± 0.70%) 10.82s (± 0.69%) +0.02s (+ 0.22%) 10.67s 11.01s
material-ui - node (v14.15.1, x64)
Memory used 445,680k (± 0.04%) 445,679k (± 0.01%) -1k (- 0.00%) 445,600k 445,753k
Parse Time 1.87s (± 0.36%) 1.88s (± 0.44%) +0.01s (+ 0.64%) 1.87s 1.91s
Bind Time 0.69s (± 0.52%) 0.73s (± 1.32%) +0.03s (+ 4.47%) 0.71s 0.75s
Check Time 13.07s (± 0.51%) 13.15s (± 0.85%) +0.08s (+ 0.64%) 12.96s 13.49s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.63s (± 0.42%) 15.76s (± 0.74%) +0.13s (+ 0.84%) 15.57s 16.12s
xstate - node (v14.15.1, x64)
Memory used 535,271k (± 0.01%) 535,191k (± 0.00%) -80k (- 0.01%) 535,138k 535,244k
Parse Time 2.58s (± 0.41%) 2.59s (± 0.43%) +0.01s (+ 0.39%) 2.56s 2.62s
Bind Time 1.14s (± 0.86%) 1.14s (± 0.93%) +0.00s (+ 0.18%) 1.12s 1.18s
Check Time 1.52s (± 0.46%) 1.52s (± 0.54%) +0.00s (+ 0.07%) 1.50s 1.54s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.32s (± 0.31%) 5.33s (± 0.26%) +0.01s (+ 0.26%) 5.30s 5.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)
Benchmark Name Iterations
Current 49089 10
Baseline main 10

Developer Information:

Download Benchmark

@rbuckton
Copy link
Member Author

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 21, 2022

Heya @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 rbuckton force-pushed the mergeDecoratorsAndModifiers branch from c7fce15 to 01f9749 Compare May 21, 2022 06:28
@typescript-bot
Copy link
Collaborator

@rbuckton
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49089

Metric main 49089 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 357,680k (± 0.02%) 357,392k (± 0.01%) -288k (- 0.08%) 357,325k 357,492k
Parse Time 2.07s (± 0.36%) 2.10s (± 0.32%) +0.03s (+ 1.45%) 2.08s 2.11s
Bind Time 0.87s (± 0.79%) 0.88s (± 0.41%) +0.02s (+ 2.08%) 0.88s 0.89s
Check Time 5.83s (± 0.51%) 5.83s (± 0.38%) +0.01s (+ 0.10%) 5.77s 5.87s
Emit Time 6.01s (± 0.51%) 5.99s (± 0.51%) -0.02s (- 0.27%) 5.95s 6.08s
Total Time 14.76s (± 0.32%) 14.80s (± 0.31%) +0.04s (+ 0.26%) 14.73s 14.89s
Compiler-Unions - node (v10.16.3, x64)
Memory used 205,981k (± 0.03%) 205,739k (± 0.03%) -241k (- 0.12%) 205,574k 205,828k
Parse Time 0.84s (± 0.66%) 0.84s (± 1.12%) +0.00s (+ 0.24%) 0.82s 0.86s
Bind Time 0.52s (± 1.47%) 0.53s (± 1.42%) +0.01s (+ 2.13%) 0.51s 0.55s
Check Time 7.91s (± 0.56%) 7.98s (± 0.45%) +0.07s (+ 0.87%) 7.88s 8.03s
Emit Time 2.51s (± 1.17%) 2.49s (± 0.69%) -0.02s (- 0.64%) 2.45s 2.53s
Total Time 11.78s (± 0.49%) 11.84s (± 0.27%) +0.06s (+ 0.54%) 11.75s 11.89s
Monaco - node (v10.16.3, x64)
Memory used 343,851k (± 0.02%) 343,529k (± 0.02%) -322k (- 0.09%) 343,361k 343,657k
Parse Time 1.59s (± 0.49%) 1.60s (± 0.36%) +0.01s (+ 0.75%) 1.59s 1.61s
Bind Time 0.75s (± 0.77%) 0.76s (± 0.39%) +0.01s (+ 1.20%) 0.76s 0.77s
Check Time 5.81s (± 0.39%) 5.89s (± 0.52%) +0.08s (+ 1.33%) 5.83s 5.96s
Emit Time 3.23s (± 0.80%) 3.23s (± 0.60%) -0.00s (- 0.12%) 3.19s 3.27s
Total Time 11.39s (± 0.33%) 11.48s (± 0.34%) +0.09s (+ 0.82%) 11.38s 11.57s
TFS - node (v10.16.3, x64)
Memory used 305,518k (± 0.02%) 304,931k (± 0.02%) -588k (- 0.19%) 304,714k 305,027k
Parse Time 1.29s (± 0.51%) 1.29s (± 0.64%) +0.00s (+ 0.31%) 1.28s 1.31s
Bind Time 0.72s (± 0.69%) 0.72s (± 0.31%) +0.00s (+ 0.70%) 0.72s 0.73s
Check Time 5.27s (± 0.28%) 5.29s (± 0.67%) +0.02s (+ 0.42%) 5.21s 5.37s
Emit Time 3.45s (± 0.98%) 3.42s (± 0.88%) -0.03s (- 0.81%) 3.35s 3.49s
Total Time 10.73s (± 0.34%) 10.73s (± 0.50%) +0.00s (+ 0.03%) 10.62s 10.85s
material-ui - node (v10.16.3, x64)
Memory used 468,562k (± 0.02%) 468,396k (± 0.01%) -166k (- 0.04%) 468,306k 468,555k
Parse Time 1.84s (± 0.41%) 1.84s (± 0.65%) +0.00s (+ 0.16%) 1.82s 1.88s
Bind Time 0.67s (± 1.77%) 0.69s (± 0.89%) +0.02s (+ 2.83%) 0.67s 0.70s
Check Time 14.32s (± 0.64%) 14.36s (± 0.29%) +0.04s (+ 0.31%) 14.28s 14.44s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.82s (± 0.56%) 16.89s (± 0.24%) +0.06s (+ 0.39%) 16.81s 16.98s
xstate - node (v10.16.3, x64)
Memory used 575,259k (± 1.32%) 575,021k (± 1.31%) -238k (- 0.04%) 571,405k 605,452k
Parse Time 2.59s (± 0.26%) 2.60s (± 0.18%) +0.02s (+ 0.62%) 2.59s 2.61s
Bind Time 1.00s (± 0.47%) 1.02s (± 1.43%) +0.02s (+ 1.79%) 1.00s 1.07s
Check Time 1.53s (± 0.73%) 1.52s (± 0.46%) -0.01s (- 0.91%) 1.50s 1.53s
Emit Time 0.07s (± 4.13%) 0.07s (± 0.00%) -0.00s (- 2.78%) 0.07s 0.07s
Total Time 5.20s (± 0.23%) 5.21s (± 0.34%) +0.02s (+ 0.31%) 5.20s 5.28s
Angular - node (v12.1.0, x64)
Memory used 335,407k (± 0.02%) 335,059k (± 0.02%) -349k (- 0.10%) 334,879k 335,250k
Parse Time 2.07s (± 0.67%) 2.09s (± 0.58%) +0.02s (+ 0.82%) 2.06s 2.12s
Bind Time 0.82s (± 0.60%) 0.85s (± 0.90%) +0.02s (+ 2.55%) 0.84s 0.87s
Check Time 5.62s (± 0.47%) 5.68s (± 0.46%) +0.06s (+ 1.03%) 5.63s 5.74s
Emit Time 6.25s (± 0.55%) 6.25s (± 0.59%) +0.00s (+ 0.08%) 6.17s 6.37s
Total Time 14.76s (± 0.37%) 14.86s (± 0.23%) +0.10s (+ 0.66%) 14.79s 14.92s
Compiler-Unions - node (v12.1.0, x64)
Memory used 193,570k (± 0.11%) 193,383k (± 0.12%) -187k (- 0.10%) 192,870k 193,759k
Parse Time 0.84s (± 1.05%) 0.84s (± 0.84%) +0.00s (+ 0.24%) 0.83s 0.86s
Bind Time 0.53s (± 0.90%) 0.54s (± 0.88%) +0.02s (+ 3.04%) 0.53s 0.55s
Check Time 7.40s (± 0.34%) 7.42s (± 0.57%) +0.02s (+ 0.27%) 7.32s 7.52s
Emit Time 2.51s (± 0.95%) 2.51s (± 0.63%) +0.00s (+ 0.04%) 2.47s 2.55s
Total Time 11.28s (± 0.27%) 11.32s (± 0.48%) +0.04s (+ 0.36%) 11.22s 11.46s
Monaco - node (v12.1.0, x64)
Memory used 326,861k (± 0.02%) 326,604k (± 0.02%) -256k (- 0.08%) 326,460k 326,787k
Parse Time 1.56s (± 0.53%) 1.56s (± 0.88%) +0.01s (+ 0.64%) 1.55s 1.61s
Bind Time 0.74s (± 0.75%) 0.76s (± 0.79%) +0.01s (+ 1.89%) 0.74s 0.77s
Check Time 5.66s (± 0.57%) 5.71s (± 0.54%) +0.05s (+ 0.87%) 5.65s 5.79s
Emit Time 3.28s (± 1.07%) 3.27s (± 0.77%) -0.00s (- 0.09%) 3.23s 3.34s
Total Time 11.23s (± 0.53%) 11.30s (± 0.43%) +0.07s (+ 0.63%) 11.22s 11.43s
TFS - node (v12.1.0, x64)
Memory used 290,145k (± 0.02%) 289,582k (± 0.02%) -563k (- 0.19%) 289,430k 289,720k
Parse Time 1.30s (± 0.77%) 1.30s (± 0.38%) -0.00s (- 0.08%) 1.29s 1.31s
Bind Time 0.73s (± 0.68%) 0.75s (± 1.71%) +0.03s (+ 3.72%) 0.74s 0.80s
Check Time 5.20s (± 0.35%) 5.23s (± 0.29%) +0.03s (+ 0.63%) 5.20s 5.28s
Emit Time 3.51s (± 0.66%) 3.49s (± 0.47%) -0.03s (- 0.80%) 3.46s 3.54s
Total Time 10.73s (± 0.35%) 10.76s (± 0.13%) +0.03s (+ 0.28%) 10.74s 10.80s
material-ui - node (v12.1.0, x64)
Memory used 447,477k (± 0.02%) 447,405k (± 0.01%) -72k (- 0.02%) 447,295k 447,531k
Parse Time 1.83s (± 0.57%) 1.84s (± 0.66%) +0.01s (+ 0.60%) 1.82s 1.87s
Bind Time 0.65s (± 0.46%) 0.68s (± 0.50%) +0.02s (+ 3.83%) 0.67s 0.68s
Check Time 12.93s (± 0.50%) 12.94s (± 0.56%) +0.01s (+ 0.04%) 12.83s 13.17s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.41s (± 0.44%) 15.46s (± 0.50%) +0.04s (+ 0.28%) 15.32s 15.70s
xstate - node (v12.1.0, x64)
Memory used 540,794k (± 1.37%) 537,521k (± 0.01%) -3,273k (- 0.61%) 537,371k 537,681k
Parse Time 2.52s (± 0.38%) 2.55s (± 0.35%) +0.02s (+ 0.87%) 2.52s 2.56s
Bind Time 1.03s (± 0.78%) 1.02s (± 1.17%) -0.01s (- 0.97%) 0.99s 1.05s
Check Time 1.47s (± 0.57%) 1.48s (± 0.65%) +0.01s (+ 0.82%) 1.47s 1.51s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.09s (± 0.40%) 5.12s (± 0.23%) +0.03s (+ 0.51%) 5.09s 5.15s
Angular - node (v14.15.1, x64)
Memory used 333,645k (± 0.01%) 333,180k (± 0.00%) -465k (- 0.14%) 333,145k 333,205k
Parse Time 2.04s (± 0.59%) 2.06s (± 0.35%) +0.02s (+ 0.93%) 2.05s 2.08s
Bind Time 0.87s (± 0.42%) 0.88s (± 0.66%) +0.02s (+ 1.96%) 0.87s 0.89s
Check Time 5.64s (± 0.41%) 5.65s (± 0.38%) +0.01s (+ 0.21%) 5.61s 5.71s
Emit Time 6.29s (± 0.66%) 6.33s (± 0.86%) +0.03s (+ 0.49%) 6.22s 6.48s
Total Time 14.84s (± 0.31%) 14.92s (± 0.44%) +0.08s (+ 0.53%) 14.78s 15.11s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,172k (± 0.07%) 192,027k (± 0.01%) -145k (- 0.08%) 191,967k 192,093k
Parse Time 0.85s (± 0.73%) 0.85s (± 0.70%) -0.00s (- 0.35%) 0.84s 0.86s
Bind Time 0.56s (± 0.71%) 0.57s (± 0.60%) +0.01s (+ 1.07%) 0.56s 0.57s
Check Time 7.51s (± 0.66%) 7.52s (± 0.36%) +0.01s (+ 0.09%) 7.47s 7.60s
Emit Time 2.52s (± 1.71%) 2.49s (± 0.52%) -0.03s (- 1.31%) 2.47s 2.52s
Total Time 11.44s (± 0.71%) 11.42s (± 0.25%) -0.02s (- 0.17%) 11.38s 11.49s
Monaco - node (v14.15.1, x64)
Memory used 325,621k (± 0.00%) 325,435k (± 0.01%) -186k (- 0.06%) 325,398k 325,484k
Parse Time 1.57s (± 0.46%) 1.57s (± 0.59%) +0.00s (+ 0.26%) 1.55s 1.59s
Bind Time 0.78s (± 0.77%) 0.78s (± 0.43%) +0.01s (+ 0.90%) 0.78s 0.79s
Check Time 5.56s (± 0.63%) 5.58s (± 0.27%) +0.02s (+ 0.38%) 5.56s 5.64s
Emit Time 3.33s (± 0.59%) 3.34s (± 0.62%) +0.01s (+ 0.42%) 3.31s 3.41s
Total Time 11.23s (± 0.37%) 11.28s (± 0.18%) +0.05s (+ 0.46%) 11.24s 11.34s
TFS - node (v14.15.1, x64)
Memory used 289,112k (± 0.01%) 288,567k (± 0.01%) -544k (- 0.19%) 288,533k 288,599k
Parse Time 1.36s (± 1.15%) 1.32s (± 1.04%) -0.04s (- 2.65%) 1.30s 1.36s
Bind Time 0.72s (± 0.83%) 0.76s (± 1.60%) +0.03s (+ 4.28%) 0.74s 0.80s
Check Time 5.21s (± 0.41%) 5.22s (± 0.31%) +0.01s (+ 0.21%) 5.19s 5.26s
Emit Time 3.48s (± 2.08%) 3.49s (± 1.49%) +0.02s (+ 0.43%) 3.44s 3.66s
Total Time 10.76s (± 0.78%) 10.78s (± 0.63%) +0.02s (+ 0.19%) 10.68s 10.96s
material-ui - node (v14.15.1, x64)
Memory used 445,638k (± 0.06%) 445,594k (± 0.04%) -45k (- 0.01%) 444,855k 445,731k
Parse Time 1.88s (± 0.41%) 1.89s (± 0.59%) +0.01s (+ 0.53%) 1.87s 1.92s
Bind Time 0.70s (± 0.53%) 0.72s (± 1.08%) +0.02s (+ 3.45%) 0.71s 0.74s
Check Time 13.09s (± 0.76%) 13.00s (± 0.28%) -0.08s (- 0.65%) 12.93s 13.08s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.66s (± 0.66%) 15.61s (± 0.25%) -0.05s (- 0.33%) 15.52s 15.67s
xstate - node (v14.15.1, x64)
Memory used 535,251k (± 0.01%) 535,179k (± 0.00%) -72k (- 0.01%) 535,109k 535,228k
Parse Time 2.58s (± 0.32%) 2.61s (± 0.48%) +0.02s (+ 0.89%) 2.58s 2.64s
Bind Time 1.14s (± 0.43%) 1.15s (± 0.76%) +0.02s (+ 1.50%) 1.14s 1.18s
Check Time 1.52s (± 0.44%) 1.52s (± 0.79%) +0.00s (+ 0.20%) 1.49s 1.55s
Emit Time 0.07s (± 0.00%) 0.07s (± 4.13%) +0.00s (+ 2.86%) 0.07s 0.08s
Total Time 5.31s (± 0.19%) 5.35s (± 0.42%) +0.04s (+ 0.70%) 5.31s 5.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)
Benchmark Name Iterations
Current 49089 10
Baseline main 10

Developer Information:

Download Benchmark

@rbuckton
Copy link
Member Author

rbuckton commented Jun 3, 2022

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 rbuckton force-pushed the mergeDecoratorsAndModifiers branch from 0f71949 to a906d6f Compare June 5, 2022 03:32
@rbuckton rbuckton force-pushed the mergeDecoratorsAndModifiers branch from a906d6f to d6e4576 Compare June 6, 2022 23:24
@rbuckton rbuckton merged commit 1e65b33 into main Jun 10, 2022
@rbuckton rbuckton deleted the mergeDecoratorsAndModifiers branch June 10, 2022 00:24
@rbuckton
Copy link
Member Author

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

@lvelden
Copy link

lvelden commented Jul 8, 2022

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
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 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 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 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 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-trees
microsoft/TypeScript#49089
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-trees
microsoft/TypeScript#49089
ph-fritsche added a commit to ph-fritsche/cjstoesm that referenced this pull request Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants