Skip to content

Remove most direct uses of factory from src/compilers/transformers #52957

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

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

DanielRosenwasser
Copy link
Member

Mentioned in #43423, so I casually looked over who was still doing this. We have one function that I left as-is, which was getDeclarationDiagnostics in declarations.ts.

@DanielRosenwasser
Copy link
Member Author

@typescript-bot perf test faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 24, 2023

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

Update: The results are in!

@jakebailey
Copy link
Member

What's left?

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..52957

Metric main 52957 Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 359,049k (± 0.01%) 359,048k (± 0.01%) ~ 359,024k 359,088k p=0.688 n=6
Parse Time 3.71s (± 0.26%) 3.71s (± 0.33%) ~ 3.70s 3.73s p=0.740 n=6
Bind Time 1.19s (± 0.70%) 1.19s (± 0.43%) ~ 1.19s 1.20s p=0.923 n=6
Check Time 9.41s (± 0.38%) 9.40s (± 0.37%) ~ 9.33s 9.42s p=1.000 n=6
Emit Time 7.92s (± 0.69%) 7.91s (± 0.94%) ~ 7.83s 8.02s p=0.629 n=6
Total Time 22.24s (± 0.33%) 22.22s (± 0.30%) ~ 22.14s 22.33s p=0.423 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,380k (± 0.89%) 191,400k (± 0.05%) ~ 191,249k 191,517k p=0.630 n=6
Parse Time 1.56s (± 0.77%) 1.57s (± 0.96%) ~ 1.56s 1.60s p=0.323 n=6
Bind Time 0.82s (± 0.00%) 0.82s (± 0.50%) ~ 0.82s 0.83s p=0.405 n=6
Check Time 10.11s (± 0.56%) 10.06s (± 0.64%) ~ 9.95s 10.14s p=0.228 n=6
Emit Time 3.01s (± 1.06%) 3.00s (± 0.54%) ~ 2.98s 3.02s p=0.368 n=6
Total Time 15.51s (± 0.40%) 15.46s (± 0.50%) ~ 15.36s 15.58s p=0.196 n=6
Monaco - node (v16.17.1, x64)
Memory used 343,122k (± 0.01%) 343,112k (± 0.01%) ~ 343,075k 343,153k p=0.378 n=6
Parse Time 2.79s (± 0.49%) 2.80s (± 0.42%) ~ 2.79s 2.82s p=0.742 n=6
Bind Time 1.08s (± 0.78%) 1.08s (± 0.48%) ~ 1.08s 1.09s p=0.070 n=6
Check Time 7.66s (± 0.29%) 7.69s (± 0.46%) ~ 7.63s 7.72s p=0.145 n=6
Emit Time 4.43s (± 0.89%) 4.42s (± 0.49%) ~ 4.40s 4.46s p=0.868 n=6
Total Time 15.96s (± 0.38%) 16.00s (± 0.27%) ~ 15.93s 16.06s p=0.172 n=6
TFS - node (v16.17.1, x64)
Memory used 299,246k (± 0.01%) 299,247k (± 0.01%) ~ 299,212k 299,280k p=0.936 n=6
Parse Time 2.16s (± 0.94%) 2.15s (± 0.72%) ~ 2.14s 2.18s p=0.290 n=6
Bind Time 1.24s (± 0.94%) 1.24s (± 1.29%) ~ 1.21s 1.25s p=0.867 n=6
Check Time 7.18s (± 0.58%) 7.17s (± 0.33%) ~ 7.14s 7.20s p=0.688 n=6
Emit Time 4.34s (± 0.40%) 4.33s (± 0.90%) ~ 4.28s 4.38s p=0.369 n=6
Total Time 14.93s (± 0.30%) 14.89s (± 0.47%) ~ 14.81s 14.97s p=0.369 n=6
material-ui - node (v16.17.1, x64)
Memory used 475,669k (± 0.01%) 475,683k (± 0.01%) ~ 475,618k 475,784k p=0.936 n=6
Parse Time 3.28s (± 0.36%) 3.29s (± 0.45%) ~ 3.28s 3.32s p=0.244 n=6
Bind Time 0.96s (± 0.54%) 0.96s (± 0.00%) ~ 0.96s 0.96s p=0.174 n=6
Check Time 18.15s (± 1.04%) 18.05s (± 0.27%) ~ 17.99s 18.10s p=0.688 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.39s (± 0.87%) 22.31s (± 0.24%) ~ 22.24s 22.36s p=0.810 n=6
xstate - node (v16.17.1, x64)
Memory used 545,806k (± 0.02%) 545,881k (± 0.02%) ~ 545,732k 546,043k p=0.298 n=6
Parse Time 4.28s (± 0.19%) 4.28s (± 0.25%) ~ 4.26s 4.29s p=0.187 n=6
Bind Time 1.76s (± 0.66%) 1.76s (± 0.36%) ~ 1.75s 1.77s p=1.000 n=6
Check Time 3.00s (± 0.62%) 2.99s (± 0.70%) ~ 2.97s 3.03s p=0.560 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.13s (± 0.32%) 9.12s (± 0.23%) ~ 9.10s 9.15s p=0.378 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current 52957 6
Baseline main 6

Developer Information:

Download Benchmark

@DanielRosenwasser
Copy link
Member Author

We have one function that I left as-is, which was getDeclarationDiagnostics in declarations.ts.

This is really just a top-level export. I'm not sure if it makes a ton of sense that it lives in src/transformers/declarations.ts, but I don't want to touch it here.

@DanielRosenwasser DanielRosenwasser merged commit 7a0061a into main Feb 27, 2023
@DanielRosenwasser DanielRosenwasser deleted the removeDirectFactoryUses branch February 27, 2023 19:05
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants