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

Offer auto-imports from wildcard exports with AutoImportProvider #54831

Merged
merged 4 commits into from
Jul 7, 2023

Conversation

andrewbranch
Copy link
Member

ts.sys.readDirectory is bananas 🍌. I thought this was going to be harder.

Fixes #53116

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jun 29, 2023
@andrewbranch
Copy link
Member Author

@typescript-bot user test tsserver
@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 29, 2023

Heya @andrewbranch, I've started to run the diff-based user code test suite (tsserver) on this PR at 2fc2d7d. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 29, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@andrewbranch Here are the results of running the user test suite comparing main and refs/pull/54831/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..54831
Metric main 54831 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 366,740k (± 0.01%) 366,736k (± 0.01%) ~ 366,685k 366,765k p=0.936 n=6
Parse Time 3.42s (± 0.44%) 3.42s (± 0.57%) ~ 3.39s 3.44s p=0.684 n=6
Bind Time 1.11s (± 0.46%) 1.12s (± 0.49%) ~ 1.11s 1.12s p=0.640 n=6
Check Time 8.83s (± 0.40%) 8.84s (± 0.48%) ~ 8.79s 8.91s p=0.683 n=6
Emit Time 7.50s (± 0.40%) 7.51s (± 0.52%) ~ 7.47s 7.57s p=0.686 n=6
Total Time 20.86s (± 0.27%) 20.88s (± 0.37%) ~ 20.77s 20.96s p=1.000 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 191,907k (± 1.19%) 190,977k (± 0.01%) ~ 190,946k 191,010k p=0.688 n=6
Parse Time 1.49s (± 0.81%) 1.50s (± 0.78%) ~ 1.48s 1.51s p=0.507 n=6
Bind Time 0.76s (± 0.68%) 0.77s (± 0.98%) ~ 0.76s 0.78s p=0.247 n=6
Check Time 9.44s (± 0.28%) 9.46s (± 0.79%) ~ 9.40s 9.60s p=0.686 n=6
Emit Time 2.76s (± 1.06%) 2.76s (± 0.87%) ~ 2.73s 2.79s p=1.000 n=6
Total Time 14.46s (± 0.30%) 14.49s (± 0.54%) ~ 14.42s 14.64s p=0.748 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,787k (± 0.00%) 346,802k (± 0.00%) ~ 346,788k 346,825k p=0.078 n=6
Parse Time 2.58s (± 1.00%) 2.58s (± 1.11%) ~ 2.56s 2.62s p=1.000 n=6
Bind Time 1.00s (± 0.63%) 1.00s (± 0.81%) ~ 1.00s 1.02s p=0.599 n=6
Check Time 7.16s (± 0.41%) 7.18s (± 0.70%) ~ 7.13s 7.25s p=0.935 n=6
Emit Time 4.25s (± 0.95%) 4.24s (± 0.61%) ~ 4.21s 4.28s p=0.809 n=6
Total Time 14.99s (± 0.34%) 15.00s (± 0.45%) ~ 14.92s 15.08s p=0.809 n=6
TFS - node (v18.10.0, x64)
Memory used 300,873k (± 0.01%) 300,871k (± 0.00%) ~ 300,862k 300,879k p=0.630 n=6
Parse Time 2.06s (± 0.73%) 2.06s (± 0.89%) ~ 2.04s 2.09s p=0.805 n=6
Bind Time 1.14s (± 0.96%) 1.14s (± 0.74%) ~ 1.12s 1.14s p=0.282 n=6
Check Time 6.63s (± 0.26%) 6.62s (± 0.47%) ~ 6.58s 6.66s p=0.467 n=6
Emit Time 3.84s (± 0.71%) 3.85s (± 0.79%) ~ 3.80s 3.89s p=0.687 n=6
Total Time 13.67s (± 0.42%) 13.66s (± 0.33%) ~ 13.61s 13.71s p=0.747 n=6
material-ui - node (v18.10.0, x64)
Memory used 482,437k (± 0.01%) 482,427k (± 0.01%) ~ 482,387k 482,486k p=0.689 n=6
Parse Time 3.13s (± 0.66%) 3.12s (± 0.62%) ~ 3.09s 3.14s p=0.871 n=6
Bind Time 0.92s (± 0.91%) 0.90s (± 0.57%) -0.01s (- 1.28%) 0.90s 0.91s p=0.019 n=6
Check Time 17.30s (± 0.57%) 17.26s (± 0.50%) ~ 17.14s 17.35s p=0.422 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.35s (± 0.41%) 21.29s (± 0.48%) ~ 21.14s 21.40s p=0.575 n=6
xstate - node (v18.10.0, x64)
Memory used 563,596k (± 0.02%) 563,612k (± 0.03%) ~ 563,438k 563,821k p=1.000 n=6
Parse Time 3.83s (± 0.31%) 3.82s (± 1.00%) ~ 3.79s 3.88s p=0.807 n=6
Bind Time 1.63s (± 0.39%) 1.63s (± 1.00%) ~ 1.61s 1.65s p=0.676 n=6
Check Time 2.80s (± 0.37%) 2.79s (± 0.37%) ~ 2.78s 2.81s p=0.681 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.34s (± 0.30%) 8.33s (± 0.61%) ~ 8.27s 8.40s p=0.748 n=6
Angular - node (v16.17.1, x64)
Memory used 366,131k (± 0.01%) 366,131k (± 0.01%) ~ 366,108k 366,177k p=0.936 n=6
Parse Time 3.57s (± 0.63%) 3.58s (± 0.46%) ~ 3.56s 3.60s p=0.373 n=6
Bind Time 1.18s (± 0.00%) 1.18s (± 0.35%) ~ 1.17s 1.18s p=0.405 n=6
Check Time 9.63s (± 0.24%) 9.66s (± 0.52%) ~ 9.61s 9.75s p=0.332 n=6
Emit Time 7.98s (± 0.39%) 8.01s (± 1.01%) ~ 7.88s 8.13s p=0.227 n=6
Total Time 22.36s (± 0.24%) 22.43s (± 0.48%) ~ 22.27s 22.56s p=0.228 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,803k (± 0.02%) 193,343k (± 0.68%) ~ 192,704k 196,012k p=0.298 n=6
Parse Time 1.58s (± 1.43%) 1.58s (± 0.80%) ~ 1.56s 1.59s p=1.000 n=6
Bind Time 0.82s (± 0.63%) 0.82s (± 0.63%) ~ 0.81s 0.82s p=1.000 n=6
Check Time 10.08s (± 0.46%) 10.13s (± 0.79%) ~ 10.02s 10.25s p=0.228 n=6
Emit Time 3.02s (± 1.72%) 3.03s (± 1.23%) ~ 2.99s 3.09s p=0.629 n=6
Total Time 15.49s (± 0.62%) 15.56s (± 0.44%) ~ 15.49s 15.66s p=0.297 n=6
Monaco - node (v16.17.1, x64)
Memory used 346,063k (± 0.01%) 346,061k (± 0.01%) ~ 346,035k 346,093k p=1.000 n=6
Parse Time 2.73s (± 0.76%) 2.72s (± 0.30%) ~ 2.71s 2.73s p=0.935 n=6
Bind Time 1.09s (± 0.37%) 1.08s (± 0.38%) -0.01s (- 0.92%) 1.07s 1.08s p=0.008 n=6
Check Time 7.84s (± 0.45%) 7.88s (± 0.45%) ~ 7.84s 7.93s p=0.089 n=6
Emit Time 4.46s (± 0.67%) 4.47s (± 1.38%) ~ 4.40s 4.56s p=1.000 n=6
Total Time 16.11s (± 0.39%) 16.15s (± 0.56%) ~ 16.07s 16.29s p=0.470 n=6
TFS - node (v16.17.1, x64)
Memory used 300,219k (± 0.01%) 300,199k (± 0.01%) ~ 300,174k 300,230k p=0.173 n=6
Parse Time 2.16s (± 0.35%) 2.16s (± 0.54%) ~ 2.15s 2.18s p=0.933 n=6
Bind Time 1.24s (± 1.10%) 1.23s (± 0.61%) ~ 1.22s 1.24s p=0.281 n=6
Check Time 7.32s (± 0.80%) 7.30s (± 0.31%) ~ 7.26s 7.32s p=0.808 n=6
Emit Time 4.31s (± 0.60%) 4.32s (± 0.63%) ~ 4.29s 4.36s p=0.747 n=6
Total Time 15.03s (± 0.60%) 15.02s (± 0.27%) ~ 14.96s 15.08s p=0.936 n=6
material-ui - node (v16.17.1, x64)
Memory used 481,735k (± 0.01%) 481,700k (± 0.01%) ~ 481,645k 481,762k p=0.128 n=6
Parse Time 3.26s (± 0.36%) 3.26s (± 0.26%) ~ 3.25s 3.27s p=0.555 n=6
Bind Time 0.95s (± 0.79%) 0.95s (± 0.57%) ~ 0.95s 0.96s p=0.476 n=6
Check Time 18.40s (± 0.70%) 18.35s (± 1.19%) ~ 18.16s 18.77s p=0.297 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.61s (± 0.57%) 22.56s (± 0.96%) ~ 22.36s 22.97s p=0.336 n=6
xstate - node (v16.17.1, x64)
Memory used 561,250k (± 0.01%) 561,206k (± 0.01%) ~ 561,119k 561,344k p=0.298 n=6
Parse Time 3.99s (± 0.38%) 4.01s (± 0.44%) ~ 3.98s 4.03s p=0.288 n=6
Bind Time 1.72s (± 0.48%) 1.73s (± 0.99%) ~ 1.71s 1.76s p=0.548 n=6
Check Time 3.05s (± 0.48%) 3.05s (± 0.32%) ~ 3.04s 3.06s p=0.677 n=6
Emit Time 0.09s (± 4.45%) 0.09s (± 4.45%) ~ 0.09s 0.10s p=1.000 n=6
Total Time 8.86s (± 0.17%) 8.88s (± 0.26%) ~ 8.85s 8.91s p=0.170 n=6
Angular - node (v14.21.3, x64)
Memory used 360,104k (± 0.01%) 360,115k (± 0.01%) ~ 360,057k 360,179k p=0.936 n=6
Parse Time 3.67s (± 0.53%) 3.67s (± 0.46%) ~ 3.65s 3.69s p=0.805 n=6
Bind Time 1.22s (± 1.04%) 1.21s (± 0.67%) ~ 1.21s 1.23s p=0.293 n=6
Check Time 10.07s (± 0.36%) 10.08s (± 0.44%) ~ 10.02s 10.13s p=0.687 n=6
Emit Time 8.35s (± 0.52%) 8.40s (± 0.86%) ~ 8.31s 8.48s p=0.421 n=6
Total Time 23.32s (± 0.29%) 23.37s (± 0.47%) ~ 23.22s 23.51s p=0.470 n=6
Compiler-Unions - node (v14.21.3, x64)
Memory used 188,132k (± 0.02%) 188,145k (± 0.01%) ~ 188,110k 188,180k p=0.936 n=6
Parse Time 1.62s (± 1.26%) 1.62s (± 0.61%) ~ 1.61s 1.63s p=1.000 n=6
Bind Time 0.84s (± 0.00%) 0.84s (± 0.65%) ~ 0.84s 0.85s p=0.071 n=6
Check Time 10.25s (± 0.49%) 10.28s (± 1.02%) ~ 10.13s 10.39s p=0.688 n=6
Emit Time 3.15s (± 0.44%) 3.14s (± 0.44%) ~ 3.12s 3.15s p=0.241 n=6
Total Time 15.86s (± 0.25%) 15.87s (± 0.71%) ~ 15.72s 15.98s p=0.810 n=6
Monaco - node (v14.21.3, x64)
Memory used 341,177k (± 0.01%) 341,195k (± 0.01%) ~ 341,165k 341,234k p=0.149 n=6
Parse Time 2.79s (± 0.58%) 2.80s (± 0.47%) ~ 2.78s 2.81s p=0.615 n=6
Bind Time 1.12s (± 0.88%) 1.11s (± 0.57%) ~ 1.10s 1.12s p=0.151 n=6
Check Time 8.17s (± 0.26%) 8.19s (± 0.41%) ~ 8.14s 8.24s p=0.257 n=6
Emit Time 4.68s (± 0.49%) 4.68s (± 0.81%) ~ 4.63s 4.74s p=0.935 n=6
Total Time 16.76s (± 0.26%) 16.78s (± 0.39%) ~ 16.69s 16.87s p=0.688 n=6
TFS - node (v14.21.3, x64)
Memory used 295,295k (± 0.00%) 295,305k (± 0.00%) +10k (+ 0.00%) 295,299k 295,309k p=0.013 n=6
Parse Time 2.39s (± 0.78%) 2.40s (± 0.55%) ~ 2.38s 2.42s p=0.252 n=6
Bind Time 1.07s (± 0.76%) 1.06s (± 0.77%) ~ 1.06s 1.08s p=0.389 n=6
Check Time 7.61s (± 0.47%) 7.63s (± 0.31%) ~ 7.60s 7.66s p=0.260 n=6
Emit Time 4.29s (± 0.71%) 4.31s (± 1.06%) ~ 4.27s 4.40s p=0.519 n=6
Total Time 15.35s (± 0.37%) 15.41s (± 0.42%) ~ 15.33s 15.52s p=0.127 n=6
material-ui - node (v14.21.3, x64)
Memory used 477,165k (± 0.01%) 477,172k (± 0.01%) ~ 477,149k 477,222k p=0.936 n=6
Parse Time 3.34s (± 0.44%) 3.34s (± 0.40%) ~ 3.33s 3.36s p=0.737 n=6
Bind Time 1.00s (± 0.41%) 1.00s (± 0.41%) ~ 1.00s 1.01s p=0.218 n=6
Check Time 19.18s (± 0.39%) 19.21s (± 0.51%) ~ 19.09s 19.34s p=0.630 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.52s (± 0.32%) 23.55s (± 0.45%) ~ 23.42s 23.68s p=0.872 n=6
xstate - node (v14.21.3, x64)
Memory used 550,186k (± 0.00%) 550,189k (± 0.00%) ~ 550,160k 550,212k p=0.748 n=6
Parse Time 4.23s (± 0.47%) 4.22s (± 0.41%) ~ 4.19s 4.24s p=0.686 n=6
Bind Time 1.66s (± 0.93%) 1.67s (± 0.33%) ~ 1.67s 1.68s p=0.090 n=6
Check Time 3.13s (± 0.51%) 3.13s (± 0.37%) ~ 3.11s 3.14s p=0.679 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.11s (± 0.13%) 9.11s (± 0.25%) ~ 9.09s 9.15s p=0.870 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.21.3, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.21.3, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.21.3, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.21.3, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.21.3, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54831 6
Baseline main 6

TSServer

Comparison Report - main..54831
Metric main 54831 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,561ms (± 0.50%) 2,552ms (± 0.58%) ~ 2,534ms 2,572ms p=0.423 n=6
Req 2 - geterr 5,337ms (± 0.55%) 5,344ms (± 0.61%) ~ 5,283ms 5,372ms p=0.471 n=6
Req 3 - references 340ms (± 0.64%) 342ms (± 1.33%) ~ 338ms 349ms p=0.413 n=6
Req 4 - navto 287ms (± 0.19%) 287ms (± 0.28%) ~ 285ms 287ms p=0.441 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 84ms (± 3.67%) 84ms (± 0.97%) ~ 83ms 85ms p=0.508 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,651ms (± 1.39%) 2,644ms (± 1.16%) ~ 2,606ms 2,694ms p=0.298 n=6
Req 2 - geterr 4,090ms (± 0.39%) 4,084ms (± 0.43%) ~ 4,062ms 4,114ms p=0.378 n=6
Req 3 - references 346ms (± 1.13%) 347ms (± 0.42%) ~ 345ms 349ms p=0.292 n=6
Req 4 - navto 288ms (± 0.92%) 286ms (± 0.26%) -3ms (- 0.87%) 285ms 287ms p=0.025 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 74ms (± 3.72%) 72ms (± 4.51%) ~ 70ms 77ms p=0.506 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,096ms (± 1.06%) 3,102ms (± 0.43%) ~ 3,090ms 3,122ms p=0.470 n=6
Req 2 - geterr 1,583ms (± 1.23%) 1,593ms (± 0.80%) ~ 1,568ms 1,603ms p=0.230 n=6
Req 3 - references 114ms (± 1.88%) 113ms (± 0.66%) ~ 112ms 114ms p=0.682 n=6
Req 4 - navto 369ms (± 0.40%) 368ms (± 0.20%) ~ 367ms 369ms p=0.503 n=6
Req 5 - completionInfo count 2,872 (± 0.00%) 2,872 (± 0.00%) ~ 2,872 2,872 p=1.000 n=6
Req 5 - completionInfo 376ms (± 1.18%) 378ms (± 1.76%) ~ 370ms 389ms p=1.000 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,641ms (± 0.73%) 2,635ms (± 0.37%) ~ 2,620ms 2,648ms p=0.748 n=6
Req 2 - geterr 6,020ms (± 0.34%) 5,999ms (± 0.44%) ~ 5,962ms 6,041ms p=0.128 n=6
Req 3 - references 354ms (± 0.31%) 354ms (± 0.50%) ~ 352ms 356ms p=0.564 n=6
Req 4 - navto 284ms (± 1.69%) 289ms (± 1.78%) ~ 282ms 294ms p=0.142 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 93ms (± 0.56%) 93ms (± 1.13%) ~ 91ms 94ms p=0.794 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,827ms (± 0.33%) 2,843ms (± 0.50%) +16ms (+ 0.55%) 2,828ms 2,865ms p=0.045 n=6
Req 2 - geterr 4,666ms (± 0.32%) 4,665ms (± 0.38%) ~ 4,653ms 4,699ms p=0.377 n=6
Req 3 - references 361ms (± 0.21%) 364ms (± 0.41%) +3ms (+ 0.79%) 361ms 365ms p=0.014 n=6
Req 4 - navto 280ms (± 0.95%) 283ms (± 0.86%) ~ 278ms 285ms p=0.164 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 75ms (± 0.54%) 76ms (± 0.72%) ~ 75ms 76ms p=0.282 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,230ms (± 0.36%) 3,234ms (± 0.56%) ~ 3,215ms 3,266ms p=1.000 n=6
Req 2 - geterr 1,729ms (± 1.17%) 1,748ms (± 1.11%) ~ 1,716ms 1,777ms p=0.229 n=6
Req 3 - references 129ms (± 8.12%) 122ms (± 1.12%) ~ 119ms 123ms p=0.155 n=6
Req 4 - navto 353ms (± 0.39%) 351ms (± 0.51%) ~ 349ms 354ms p=0.166 n=6
Req 5 - completionInfo count 2,872 (± 0.00%) 2,872 (± 0.00%) ~ 2,872 2,872 p=1.000 n=6
Req 5 - completionInfo 407ms (± 2.27%) 412ms (± 1.22%) ~ 403ms 417ms p=0.148 n=6
Compiler-UnionsTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,781ms (± 0.68%) 2,788ms (± 0.61%) ~ 2,758ms 2,801ms p=0.471 n=6
Req 2 - geterr 6,187ms (± 0.37%) 6,170ms (± 0.65%) ~ 6,118ms 6,225ms p=0.378 n=6
Req 3 - references 364ms (± 1.40%) 378ms (± 6.81%) ~ 361ms 414ms p=0.189 n=6
Req 4 - navto 292ms (± 0.73%) 287ms (± 2.10%) ~ 278ms 292ms p=0.286 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 101ms (± 4.02%) 100ms (± 6.98%) ~ 91ms 105ms p=0.465 n=6
CompilerTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,971ms (± 0.41%) 2,963ms (± 0.55%) ~ 2,949ms 2,992ms p=0.298 n=6
Req 2 - geterr 4,518ms (± 0.35%) 4,531ms (± 0.37%) ~ 4,513ms 4,556ms p=0.128 n=6
Req 3 - references 377ms (± 0.15%) 377ms (± 0.55%) ~ 375ms 380ms p=0.508 n=6
Req 4 - navto 298ms (± 0.35%) 297ms (± 0.54%) ~ 294ms 299ms p=0.315 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 77ms (± 0.53%) 76ms (± 1.18%) -1ms (- 1.51%) 75ms 77ms p=0.025 n=6
xstateTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 3,477ms (± 0.45%) 3,485ms (± 0.54%) ~ 3,449ms 3,504ms p=0.423 n=6
Req 2 - geterr 1,846ms (± 1.22%) 1,855ms (± 1.54%) ~ 1,810ms 1,882ms p=0.378 n=6
Req 3 - references 149ms (± 7.17%) 152ms (± 7.28%) ~ 137ms 161ms p=1.000 n=6
Req 4 - navto 395ms (± 1.08%) 397ms (± 1.33%) ~ 387ms 401ms p=0.225 n=6
Req 5 - completionInfo count 2,872 (± 0.00%) 2,872 (± 0.00%) ~ 2,872 2,872 p=1.000 n=6
Req 5 - completionInfo 435ms (± 1.50%) 436ms (± 1.36%) ~ 426ms 441ms p=0.687 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.21.3, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.21.3, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54831 6
Baseline main 6

Startup

Comparison Report - main..54831
Metric main 54831 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.28ms (± 0.20%) 142.62ms (± 0.22%) +0.34ms (+ 0.24%) 141.84ms 149.36ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 221.37ms (± 0.17%) 221.85ms (± 0.21%) +0.49ms (+ 0.22%) 220.76ms 231.70ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 222.92ms (± 0.13%) 223.21ms (± 0.18%) +0.29ms (+ 0.13%) 222.34ms 233.65ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 204.85ms (± 0.16%) 205.20ms (± 0.17%) +0.35ms (+ 0.17%) 204.42ms 209.66ms p=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-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
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 54831 6
Baseline main 6

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@andrewbranch
Copy link
Member Author

The tsserver perf tests didn’t exercise the new code in a meaningful way, apparently (the completion counts were unchanged). I’ll try to do a little manual comparison.

@andrewbranch
Copy link
Member Author

andrewbranch commented Jun 29, 2023

Discovered an unrelated bug in module specifier generation for wildcard+conditional exports that probably prevented any new completions from being found in the perf tests. Local testing shows that AutoImportProvider initialization time was barely impacted at all even though it finds a good bit more stuff, and then completions response time is pay-for-more-completions as expected.

@typescript-bot perf test

Unless we see anything weird in the updated perf test, I think this is fine.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 29, 2023

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

@andrewbranch andrewbranch changed the title Experiment: find wildcard exports with AutoImportProvider Offer auto-imports from wildcard exports with AutoImportProvider Jun 29, 2023
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Looks good although my knowledge of module resolution remains somewhat surface-level.

@typescript-bot
Copy link
Collaborator

Hey @andrewbranch, something went wrong when publishing results. (You can check the log here).

@andrewbranch
Copy link
Member Author

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 30, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..54831
Metric main 54831 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 366,757k (± 0.01%) 366,769k (± 0.01%) ~ 366,726k 366,800k p=0.378 n=6
Parse Time 3.42s (± 0.66%) 3.43s (± 0.45%) ~ 3.42s 3.46s p=0.868 n=6
Bind Time 1.12s (± 0.36%) 1.12s (± 0.36%) ~ 1.11s 1.12s p=1.000 n=6
Check Time 8.87s (± 0.46%) 8.85s (± 0.28%) ~ 8.81s 8.88s p=0.462 n=6
Emit Time 7.52s (± 0.55%) 7.48s (± 0.37%) ~ 7.45s 7.53s p=0.107 n=6
Total Time 20.93s (± 0.35%) 20.88s (± 0.24%) ~ 20.83s 20.95s p=0.225 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 191,025k (± 0.01%) 191,054k (± 0.01%) +29k (+ 0.02%) 191,025k 191,091k p=0.045 n=6
Parse Time 1.49s (± 0.92%) 1.49s (± 0.55%) ~ 1.48s 1.50s p=0.605 n=6
Bind Time 0.77s (± 1.35%) 0.77s (± 0.98%) ~ 0.76s 0.78s p=0.931 n=6
Check Time 9.47s (± 1.07%) 9.50s (± 0.56%) ~ 9.41s 9.56s p=0.296 n=6
Emit Time 2.79s (± 0.86%) 2.76s (± 0.88%) ~ 2.72s 2.79s p=0.064 n=6
Total Time 14.52s (± 0.82%) 14.51s (± 0.39%) ~ 14.43s 14.59s p=0.520 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,822k (± 0.01%) 346,819k (± 0.01%) ~ 346,779k 346,842k p=0.936 n=6
Parse Time 2.59s (± 1.22%) 2.59s (± 1.59%) ~ 2.52s 2.64s p=0.685 n=6
Bind Time 1.01s (± 1.02%) 1.00s (± 1.03%) ~ 0.99s 1.02s p=0.652 n=6
Check Time 7.32s (± 0.74%) 7.29s (± 0.45%) ~ 7.24s 7.34s p=0.260 n=6
Emit Time 4.26s (± 0.77%) 4.25s (± 0.49%) ~ 4.23s 4.28s p=0.686 n=6
Total Time 15.18s (± 0.54%) 15.13s (± 0.38%) ~ 15.07s 15.23s p=0.336 n=6
TFS - node (v18.10.0, x64)
Memory used 300,871k (± 0.00%) 300,863k (± 0.00%) ~ 300,848k 300,872k p=0.199 n=6
Parse Time 2.07s (± 1.71%) 2.07s (± 0.77%) ~ 2.05s 2.09s p=0.745 n=6
Bind Time 1.14s (± 1.51%) 1.13s (± 0.46%) ~ 1.12s 1.13s p=0.351 n=6
Check Time 6.66s (± 0.62%) 6.64s (± 0.46%) ~ 6.60s 6.68s p=0.628 n=6
Emit Time 3.87s (± 1.29%) 3.86s (± 0.42%) ~ 3.84s 3.89s p=0.518 n=6
Total Time 13.75s (± 0.45%) 13.70s (± 0.30%) ~ 13.65s 13.77s p=0.171 n=6
material-ui - node (v18.10.0, x64)
Memory used 482,398k (± 0.00%) 482,394k (± 0.00%) ~ 482,372k 482,413k p=1.000 n=6
Parse Time 3.14s (± 0.85%) 3.12s (± 0.47%) ~ 3.11s 3.15s p=0.363 n=6
Bind Time 0.92s (± 0.82%) 0.92s (± 0.91%) ~ 0.91s 0.93s p=0.172 n=6
Check Time 17.27s (± 0.70%) 17.29s (± 0.52%) ~ 17.20s 17.43s p=0.873 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.33s (± 0.64%) 21.32s (± 0.39%) ~ 21.23s 21.44s p=1.000 n=6
xstate - node (v18.10.0, x64)
Memory used 563,600k (± 0.02%) 563,569k (± 0.01%) ~ 563,500k 563,678k p=0.378 n=6
Parse Time 3.83s (± 0.79%) 3.83s (± 0.60%) ~ 3.81s 3.87s p=1.000 n=6
Bind Time 1.64s (± 0.60%) 1.63s (± 0.33%) ~ 1.63s 1.64s p=0.152 n=6
Check Time 2.79s (± 1.04%) 2.79s (± 0.81%) ~ 2.77s 2.83s p=0.809 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.34s (± 0.59%) 8.34s (± 0.24%) ~ 8.32s 8.36s p=1.000 n=6
Angular - node (v16.17.1, x64)
Memory used 366,137k (± 0.00%) 366,145k (± 0.01%) ~ 366,120k 366,166k p=0.810 n=6
Parse Time 3.58s (± 0.21%) 3.58s (± 0.39%) ~ 3.56s 3.60s p=0.867 n=6
Bind Time 1.18s (± 0.64%) 1.18s (± 0.54%) ~ 1.17s 1.19s p=0.718 n=6
Check Time 9.67s (± 0.57%) 9.63s (± 0.35%) ~ 9.60s 9.69s p=0.295 n=6
Emit Time 8.00s (± 0.48%) 7.95s (± 0.27%) -0.06s (- 0.69%) 7.92s 7.98s p=0.024 n=6
Total Time 22.43s (± 0.27%) 22.34s (± 0.22%) -0.09s (- 0.41%) 22.26s 22.40s p=0.025 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,891k (± 0.03%) 192,851k (± 0.06%) ~ 192,733k 192,975k p=0.748 n=6
Parse Time 1.58s (± 1.63%) 1.58s (± 1.29%) ~ 1.54s 1.60s p=0.506 n=6
Bind Time 0.82s (± 0.77%) 0.81s (± 0.63%) ~ 0.81s 0.82s p=0.091 n=6
Check Time 10.15s (± 0.41%) 10.09s (± 0.55%) ~ 10.01s 10.16s p=0.075 n=6
Emit Time 3.02s (± 0.86%) 3.01s (± 0.95%) ~ 2.98s 3.06s p=0.519 n=6
Total Time 15.57s (± 0.34%) 15.49s (± 0.42%) -0.08s (- 0.51%) 15.39s 15.57s p=0.045 n=6
Monaco - node (v16.17.1, x64)
Memory used 346,115k (± 0.01%) 346,113k (± 0.01%) ~ 346,065k 346,135k p=0.936 n=6
Parse Time 2.73s (± 0.79%) 2.72s (± 0.28%) ~ 2.71s 2.73s p=0.404 n=6
Bind Time 1.08s (± 0.77%) 1.08s (± 0.48%) ~ 1.08s 1.09s p=0.533 n=6
Check Time 8.01s (± 0.58%) 7.98s (± 0.46%) ~ 7.93s 8.04s p=0.227 n=6
Emit Time 4.51s (± 1.39%) 4.44s (± 0.33%) -0.07s (- 1.59%) 4.42s 4.46s p=0.029 n=6
Total Time 16.34s (± 0.71%) 16.22s (± 0.25%) -0.12s (- 0.72%) 16.17s 16.28s p=0.037 n=6
TFS - node (v16.17.1, x64)
Memory used 300,218k (± 0.00%) 300,221k (± 0.00%) ~ 300,210k 300,228k p=0.747 n=6
Parse Time 2.16s (± 0.56%) 2.16s (± 0.38%) ~ 2.15s 2.17s p=0.354 n=6
Bind Time 1.23s (± 0.85%) 1.24s (± 0.94%) ~ 1.22s 1.25s p=0.279 n=6
Check Time 7.32s (± 0.24%) 7.32s (± 0.36%) ~ 7.28s 7.35s p=1.000 n=6
Emit Time 4.35s (± 0.66%) 4.34s (± 0.61%) ~ 4.30s 4.37s p=0.462 n=6
Total Time 15.07s (± 0.33%) 15.06s (± 0.36%) ~ 15.00s 15.13s p=1.000 n=6
material-ui - node (v16.17.1, x64)
Memory used 481,659k (± 0.01%) 481,639k (± 0.01%) ~ 481,606k 481,682k p=0.689 n=6
Parse Time 3.26s (± 0.36%) 3.26s (± 0.32%) ~ 3.24s 3.27s p=0.615 n=6
Bind Time 0.95s (± 0.57%) 0.95s (± 0.67%) ~ 0.94s 0.96s p=0.201 n=6
Check Time 18.39s (± 0.61%) 18.33s (± 0.38%) ~ 18.25s 18.45s p=0.377 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.61s (± 0.50%) 22.54s (± 0.33%) ~ 22.45s 22.66s p=0.261 n=6
xstate - node (v16.17.1, x64)
Memory used 561,157k (± 0.01%) 561,140k (± 0.01%) ~ 561,081k 561,214k p=0.748 n=6
Parse Time 4.01s (± 0.32%) 3.99s (± 0.25%) -0.02s (- 0.54%) 3.97s 4.00s p=0.009 n=6
Bind Time 1.74s (± 1.03%) 1.73s (± 0.52%) ~ 1.72s 1.74s p=0.359 n=6
Check Time 3.06s (± 0.45%) 3.05s (± 0.38%) ~ 3.03s 3.06s p=0.113 n=6
Emit Time 0.09s (± 5.53%) 0.09s (± 5.53%) ~ 0.09s 0.10s p=1.000 n=6
Total Time 8.91s (± 0.31%) 8.86s (± 0.28%) -0.05s (- 0.58%) 8.83s 8.88s p=0.005 n=6
Angular - node (v14.21.3, x64)
Memory used 360,078k (± 0.01%) 360,088k (± 0.01%) ~ 360,045k 360,138k p=0.689 n=6
Parse Time 3.67s (± 0.88%) 3.67s (± 0.40%) ~ 3.64s 3.68s p=0.746 n=6
Bind Time 1.22s (± 0.84%) 1.21s (± 0.43%) ~ 1.21s 1.22s p=0.070 n=6
Check Time 10.12s (± 0.29%) 10.06s (± 0.28%) -0.06s (- 0.58%) 10.02s 10.09s p=0.008 n=6
Emit Time 8.42s (± 0.83%) 8.35s (± 0.58%) ~ 8.27s 8.41s p=0.149 n=6
Total Time 23.44s (± 0.43%) 23.30s (± 0.30%) -0.14s (- 0.60%) 23.17s 23.36s p=0.030 n=6
Compiler-Unions - node (v14.21.3, x64)
Memory used 188,136k (± 0.05%) 188,170k (± 0.01%) ~ 188,152k 188,178k p=0.688 n=6
Parse Time 1.62s (± 0.72%) 1.62s (± 0.46%) ~ 1.61s 1.63s p=0.734 n=6
Bind Time 0.85s (± 2.30%) 0.84s (± 0.00%) ~ 0.84s 0.84s p=0.074 n=6
Check Time 10.26s (± 0.38%) 10.26s (± 0.57%) ~ 10.19s 10.35s p=1.000 n=6
Emit Time 3.18s (± 3.44%) 3.16s (± 0.99%) ~ 3.13s 3.21s p=0.747 n=6
Total Time 15.91s (± 0.85%) 15.88s (± 0.36%) ~ 15.84s 15.99s p=0.810 n=6
Monaco - node (v14.21.3, x64)
Memory used 341,240k (± 0.01%) 341,228k (± 0.01%) ~ 341,204k 341,261k p=0.378 n=6
Parse Time 2.81s (± 0.44%) 2.79s (± 0.39%) ~ 2.77s 2.80s p=0.062 n=6
Bind Time 1.12s (± 1.10%) 1.11s (± 0.93%) ~ 1.09s 1.12s p=0.341 n=6
Check Time 8.30s (± 0.43%) 8.30s (± 0.53%) ~ 8.25s 8.36s p=0.808 n=6
Emit Time 4.68s (± 0.45%) 4.67s (± 0.65%) ~ 4.62s 4.70s p=0.870 n=6
Total Time 16.90s (± 0.17%) 16.87s (± 0.28%) ~ 16.80s 16.93s p=0.374 n=6
TFS - node (v14.21.3, x64)
Memory used 295,300k (± 0.00%) 295,292k (± 0.00%) -7k (- 0.00%) 295,290k 295,296k p=0.027 n=6
Parse Time 2.39s (± 1.12%) 2.38s (± 0.53%) ~ 2.36s 2.39s p=0.622 n=6
Bind Time 1.06s (± 0.71%) 1.06s (± 0.38%) ~ 1.06s 1.07s p=1.000 n=6
Check Time 7.66s (± 0.24%) 7.62s (± 0.64%) ~ 7.57s 7.67s p=0.194 n=6
Emit Time 4.30s (± 0.50%) 4.28s (± 0.35%) ~ 4.25s 4.29s p=0.052 n=6
Total Time 15.42s (± 0.29%) 15.34s (± 0.22%) -0.08s (- 0.50%) 15.29s 15.37s p=0.024 n=6
material-ui - node (v14.21.3, x64)
Memory used 477,186k (± 0.00%) 477,176k (± 0.00%) ~ 477,150k 477,191k p=0.422 n=6
Parse Time 3.36s (± 0.49%) 3.33s (± 0.35%) -0.03s (- 0.79%) 3.31s 3.34s p=0.019 n=6
Bind Time 1.00s (± 0.51%) 1.00s (± 0.51%) ~ 1.00s 1.01s p=1.000 n=6
Check Time 19.22s (± 0.55%) 19.26s (± 0.27%) ~ 19.17s 19.31s p=0.260 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.58s (± 0.46%) 23.60s (± 0.21%) ~ 23.52s 23.65s p=0.689 n=6
xstate - node (v14.21.3, x64)
Memory used 550,177k (± 0.00%) 550,186k (± 0.00%) ~ 550,166k 550,210k p=0.423 n=6
Parse Time 4.23s (± 0.39%) 4.22s (± 0.28%) ~ 4.20s 4.23s p=0.515 n=6
Bind Time 1.67s (± 1.44%) 1.66s (± 1.06%) ~ 1.63s 1.67s p=0.250 n=6
Check Time 3.14s (± 0.69%) 3.13s (± 0.27%) ~ 3.12s 3.14s p=0.204 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.12s (± 0.28%) 9.08s (± 0.24%) -0.04s (- 0.40%) 9.05s 9.11s p=0.044 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.21.3, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.21.3, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.21.3, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.21.3, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.21.3, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54831 6
Baseline main 6

TSServer

Comparison Report - main..54831
Metric main 54831 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,577ms (± 0.63%) 2,557ms (± 0.46%) ~ 2,539ms 2,570ms p=0.078 n=6
Req 2 - geterr 5,378ms (± 0.44%) 5,364ms (± 0.34%) ~ 5,328ms 5,375ms p=0.336 n=6
Req 3 - references 340ms (± 1.01%) 340ms (± 0.51%) ~ 338ms 342ms p=0.934 n=6
Req 4 - navto 287ms (± 0.56%) 287ms (± 0.51%) ~ 285ms 289ms p=1.000 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 83ms (± 3.23%) 84ms (± 2.79%) ~ 79ms 85ms p=0.366 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,642ms (± 1.59%) 2,643ms (± 0.57%) ~ 2,616ms 2,655ms p=0.936 n=6
Req 2 - geterr 4,095ms (± 0.52%) 4,116ms (± 0.42%) ~ 4,090ms 4,132ms p=0.093 n=6
Req 3 - references 346ms (± 1.19%) 348ms (± 0.18%) ~ 347ms 349ms p=0.367 n=6
Req 4 - navto 288ms (± 1.37%) 287ms (± 0.52%) ~ 285ms 289ms p=0.746 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 73ms (± 4.16%) 74ms (± 6.17%) ~ 71ms 83ms p=0.515 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,110ms (± 0.53%) 3,100ms (± 0.92%) ~ 3,078ms 3,146ms p=0.298 n=6
Req 2 - geterr 1,594ms (± 0.63%) 1,585ms (± 0.65%) ~ 1,566ms 1,595ms p=0.229 n=6
Req 3 - references 114ms (± 1.29%) 114ms (± 1.82%) ~ 111ms 116ms p=0.935 n=6
Req 4 - navto 370ms (± 0.81%) 370ms (± 0.85%) ~ 367ms 376ms p=0.934 n=6
Req 5 - completionInfo count 2,872 (± 0.00%) 2,872 (± 0.00%) ~ 2,872 2,872 p=1.000 n=6
Req 5 - completionInfo 381ms (± 3.45%) 376ms (± 2.57%) ~ 362ms 390ms p=0.574 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,643ms (± 0.61%) 2,625ms (± 0.50%) ~ 2,611ms 2,648ms p=0.078 n=6
Req 2 - geterr 6,017ms (± 0.48%) 6,020ms (± 0.58%) ~ 5,985ms 6,079ms p=0.936 n=6
Req 3 - references 354ms (± 0.80%) 354ms (± 0.53%) ~ 350ms 355ms p=0.870 n=6
Req 4 - navto 292ms (± 1.31%) 287ms (± 1.93%) ~ 281ms 294ms p=0.050 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 93ms (± 1.52%) 92ms (± 0.88%) ~ 91ms 93ms p=0.402 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,826ms (± 0.82%) 2,832ms (± 0.74%) ~ 2,798ms 2,858ms p=0.471 n=6
Req 2 - geterr 4,676ms (± 0.95%) 4,669ms (± 0.46%) ~ 4,646ms 4,697ms p=0.873 n=6
Req 3 - references 365ms (± 0.66%) 363ms (± 0.27%) ~ 362ms 364ms p=0.168 n=6
Req 4 - navto 281ms (± 1.38%) 283ms (± 0.69%) ~ 280ms 285ms p=0.331 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 76ms (± 0.54%) 76ms (± 0.68%) ~ 76ms 77ms p=0.595 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,236ms (± 0.53%) 3,231ms (± 0.32%) ~ 3,220ms 3,246ms p=0.575 n=6
Req 2 - geterr 1,741ms (± 1.38%) 1,736ms (± 0.72%) ~ 1,712ms 1,747ms p=0.093 n=6
Req 3 - references 121ms (± 1.36%) 122ms (± 1.21%) ~ 119ms 123ms p=0.246 n=6
Req 4 - navto 352ms (± 0.66%) 352ms (± 0.50%) ~ 350ms 355ms p=0.871 n=6
Req 5 - completionInfo count 2,872 (± 0.00%) 2,872 (± 0.00%) ~ 2,872 2,872 p=1.000 n=6
Req 5 - completionInfo 413ms (± 2.55%) 413ms (± 1.73%) ~ 404ms 421ms p=1.000 n=6
Compiler-UnionsTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,786ms (± 0.74%) 2,806ms (± 0.65%) +20ms (+ 0.71%) 2,786ms 2,836ms p=0.045 n=6
Req 2 - geterr 6,169ms (± 0.66%) 6,197ms (± 2.01%) ~ 6,084ms 6,434ms p=0.810 n=6
Req 3 - references 369ms (± 5.57%) 363ms (± 0.95%) ~ 359ms 369ms p=0.467 n=6
Req 4 - navto 289ms (± 1.43%) 294ms (± 1.77%) ~ 290ms 304ms p=0.183 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 102ms (± 4.96%) 103ms (± 1.14%) ~ 101ms 104ms p=0.366 n=6
CompilerTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,977ms (± 0.51%) 2,963ms (± 0.74%) ~ 2,923ms 2,984ms p=0.261 n=6
Req 2 - geterr 4,559ms (± 0.76%) 4,546ms (± 0.74%) ~ 4,512ms 4,589ms p=0.748 n=6
Req 3 - references 378ms (± 0.72%) 376ms (± 0.29%) ~ 375ms 378ms p=0.277 n=6
Req 4 - navto 298ms (± 0.78%) 298ms (± 0.27%) ~ 297ms 299ms p=0.738 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 76ms (± 1.97%) 76ms (± 0.54%) ~ 76ms 77ms p=0.858 n=6
xstateTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 3,485ms (± 0.90%) 3,483ms (± 0.33%) ~ 3,461ms 3,492ms p=0.748 n=6
Req 2 - geterr 1,855ms (± 0.47%) 1,853ms (± 0.51%) ~ 1,839ms 1,864ms p=0.686 n=6
Req 3 - references 152ms (± 6.47%) 156ms (± 6.03%) ~ 137ms 162ms p=0.463 n=6
Req 4 - navto 397ms (± 0.57%) 395ms (± 1.11%) ~ 386ms 398ms p=1.000 n=6
Req 5 - completionInfo count 2,872 (± 0.00%) 2,872 (± 0.00%) ~ 2,872 2,872 p=1.000 n=6
Req 5 - completionInfo 438ms (± 2.49%) 441ms (± 0.57%) ~ 436ms 443ms p=0.936 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.21.3, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.21.3, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54831 6
Baseline main 6

Startup

Comparison Report - main..54831
Metric main 54831 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.48ms (± 0.24%) 142.35ms (± 0.19%) -0.13ms (- 0.09%) 141.69ms 145.07ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 221.77ms (± 0.23%) 221.48ms (± 0.18%) -0.29ms (- 0.13%) 220.42ms 226.49ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 223.58ms (± 0.27%) 222.92ms (± 0.14%) -0.66ms (- 0.30%) 222.13ms 226.62ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 205.06ms (± 0.21%) 205.02ms (± 0.16%) ~ 204.19ms 208.87ms p=0.399 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-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
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 54831 6
Baseline main 6

Developer Information:

Download Benchmark

@@ -2620,7 +2622,7 @@ export class AutoImportProviderProject extends Project {
throw new Error("package.json changes should be notified on an AutoImportProvider's host project");
}

override getModuleResolutionHostForAutoImportProvider(): never {
override getHostForAutoImportProvider(): never {
Copy link
Member

Choose a reason for hiding this comment

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

Should this have been internal to begin with

Copy link
Member Author

Choose a reason for hiding this comment

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

It’s never been clear to me what parts of TS Server are intended to be public API. It seems like this whole class could be internal.

@fatcerberus
Copy link

ts.sys.readDirectory is bananas 🍌.

I'm kind of curious what's meant by this because I personally found readDirectory to be one of the hardest CompilerHost methods to implement properly (i.e. to emulate tsc behavior) myself:
https://github.com/fatcerberus/ts-sphere/blob/master/cell/ts-tool.js#L104-L115

The naive implementation of "just return the whole directory listing for the given directory" (and the name implies that should be its only responsibility) ended up pulling too much into the compilation (i.e. literally everything in node_modules, recursively)

@andrewbranch
Copy link
Member Author

Yeah, I mean it does so much. It’s based on ts.matchFiles, but I think that’s private API. I wouldn’t want to try to reimplement it.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

I'm not super confident in my ability to review this bit, but it seems okay.

@@ -194,6 +198,15 @@ function formatExtensions(extensions: Extensions) {
return result.join(", ");
}

function extensionsToExtensionsArray(extensions: Extensions) {
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, how often does this happen? Is it worth caching in some way given the key is just a number?

Copy link
Member Author

Choose a reason for hiding this comment

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

The number of packages AutoImportProvider will process is capped at 10, so surely not enough times to be make an observable impact.

@@ -2140,7 +2158,7 @@ export function getEntrypointsFromPackageJsonInfo(
function loadEntrypointsFromExportMap(
scope: PackageJsonInfo,
exports: object,
state: ModuleResolutionState,
state: ModuleResolutionState & { host: GetPackageJsonEntrypointsHost },
Copy link
Member

Choose a reason for hiding this comment

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

I was going to ask if this would be better served as a parameter rather than tacked onto the state, but it does seem like this was already happening given what's in useCaseSensitiveFileNames.

Copy link
Member Author

Choose a reason for hiding this comment

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

This isn’t adding a host property, it’s narrowing the type of the existing host property.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I was just unsure without trying to find this type (which I should have done!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offer auto-imports for all files in package.json exports wildcard directories
6 participants