Skip to content

Add cache to auto-import package.json filter #52422

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

Conversation

andrewbranch
Copy link
Member

I was debugging another issue and noticed that during completions, we go through some work to generate the module specifiers for every export within an ambient module, when obviously that work only needs to be done once per module, not once per export. It made it a pain to debug module specifier generation since I was hitting a breakpoint in one of those functions called with the same inputs over and over, but apparently that work is quite cheap, because I can’t see any appreciable difference locally. Figured I would run the server perf tests though.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 26, 2023
@andrewbranch
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 26, 2023

Heya @andrewbranch, I've started to run the perf test suite on this PR at 638dd64. 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..52422
Metric main 52422 Delta Best Worst
Angular - node (v18.10.0, x64)
Memory used 359,846k (± 0.01%) 359,821k (± 0.01%) -25k (- 0.01%) 359,757k 359,872k
Parse Time 3.95s (± 0.94%) 3.96s (± 0.79%) +0.01s (+ 0.13%) 3.93s 4.01s
Bind Time 1.17s (± 0.35%) 1.17s (± 0.70%) +0.00s (+ 0.14%) 1.16s 1.18s
Check Time 8.64s (± 0.18%) 8.66s (± 0.39%) +0.01s (+ 0.15%) 8.62s 8.72s
Emit Time 7.61s (± 0.55%) 7.63s (± 0.85%) +0.02s (+ 0.33%) 7.56s 7.71s
Total Time 21.38s (± 0.25%) 21.42s (± 0.28%) +0.04s (+ 0.19%) 21.31s 21.47s
Compiler-Unions - node (v18.10.0, x64)
Memory used 194,483k (± 1.49%) 192,586k (± 0.04%) -1,896k (- 0.98%) 192,523k 192,737k
Parse Time 1.65s (± 1.58%) 1.63s (± 2.16%) -0.03s (- 1.52%) 1.60s 1.67s
Bind Time 0.79s (± 0.52%) 0.79s (± 0.00%) -0.00s (- 0.21%) 0.79s 0.79s
Check Time 9.69s (± 1.15%) 9.66s (± 0.85%) -0.03s (- 0.36%) 9.55s 9.78s
Emit Time 2.81s (± 1.38%) 2.81s (± 0.66%) +0.00s (+ 0.06%) 2.80s 2.85s
Total Time 14.95s (± 0.86%) 14.89s (± 0.52%) -0.06s (- 0.39%) 14.80s 14.98s
Monaco - node (v18.10.0, x64)
Memory used 343,983k (± 0.02%) 343,983k (± 0.01%) 0k ( 0.00%) 343,951k 344,021k
Parse Time 2.95s (± 0.84%) 2.96s (± 1.30%) +0.00s (+ 0.11%) 2.90s 2.99s
Bind Time 1.03s (± 1.29%) 1.04s (± 1.42%) +0.01s (+ 0.97%) 1.02s 1.06s
Check Time 7.06s (± 0.45%) 7.04s (± 0.43%) -0.02s (- 0.26%) 7.02s 7.10s
Emit Time 4.31s (± 0.85%) 4.33s (± 0.70%) +0.02s (+ 0.54%) 4.27s 4.35s
Total Time 15.34s (± 0.22%) 15.37s (± 0.42%) +0.03s (+ 0.18%) 15.29s 15.46s
TFS - node (v18.10.0, x64)
Memory used 300,373k (± 0.01%) 300,372k (± 0.01%) -0k (- 0.00%) 300,344k 300,398k
Parse Time 2.28s (± 1.10%) 2.27s (± 0.65%) -0.02s (- 0.66%) 2.25s 2.28s
Bind Time 1.17s (± 0.44%) 1.17s (± 0.64%) +0.00s (+ 0.14%) 1.16s 1.18s
Check Time 6.52s (± 0.25%) 6.52s (± 0.46%) -0.01s (- 0.13%) 6.48s 6.55s
Emit Time 3.91s (± 0.64%) 3.92s (± 0.69%) +0.01s (+ 0.13%) 3.89s 3.96s
Total Time 13.88s (± 0.20%) 13.87s (± 0.37%) -0.01s (- 0.08%) 13.83s 13.94s
material-ui - node (v18.10.0, x64)
Memory used 476,734k (± 0.02%) 476,733k (± 0.01%) -1k (- 0.00%) 476,710k 476,776k
Parse Time 3.56s (± 0.42%) 3.56s (± 0.55%) 0.00s ( 0.00%) 3.52s 3.58s
Bind Time 0.97s (± 0.65%) 0.97s (± 0.42%) -0.00s (- 0.17%) 0.96s 0.97s
Check Time 17.05s (± 0.29%) 17.17s (± 0.88%) +0.12s (+ 0.72%) 17.04s 17.46s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.57s (± 0.21%) 21.70s (± 0.71%) +0.13s (+ 0.59%) 21.57s 21.99s
xstate - node (v18.10.0, x64)
Memory used 548,529k (± 0.02%) 548,564k (± 0.02%) +35k (+ 0.01%) 548,436k 548,699k
Parse Time 4.56s (± 0.83%) 4.59s (± 0.50%) +0.03s (+ 0.62%) 4.56s 4.63s
Bind Time 1.72s (± 1.91%) 1.71s (± 1.09%) -0.01s (- 0.29%) 1.69s 1.74s
Check Time 2.71s (± 1.31%) 2.73s (± 1.08%) +0.02s (+ 0.68%) 2.69s 2.77s
Emit Time 0.08s (± 4.99%) 0.09s (± 5.95%) +0.00s (+ 6.12%) 0.08s 0.09s
Total Time 9.08s (± 0.91%) 9.13s (± 0.42%) +0.05s (+ 0.51%) 9.06s 9.17s
Angular - node (v16.17.1, x64)
Memory used 359,206k (± 0.01%) 359,221k (± 0.01%) +14k (+ 0.00%) 359,181k 359,245k
Parse Time 4.17s (± 0.55%) 4.19s (± 0.28%) +0.02s (+ 0.44%) 4.17s 4.20s
Bind Time 1.22s (± 0.52%) 1.23s (± 0.33%) +0.01s (+ 0.68%) 1.22s 1.23s
Check Time 9.40s (± 0.35%) 9.42s (± 0.54%) +0.02s (+ 0.21%) 9.36s 9.49s
Emit Time 8.06s (± 0.65%) 8.10s (± 0.66%) +0.04s (+ 0.48%) 8.04s 8.18s
Total Time 22.85s (± 0.25%) 22.93s (± 0.43%) +0.08s (+ 0.36%) 22.83s 23.07s
Compiler-Unions - node (v16.17.1, x64)
Memory used 194,205k (± 0.04%) 194,196k (± 0.04%) -9k (- 0.00%) 194,123k 194,358k
Parse Time 1.80s (± 0.29%) 1.80s (± 0.50%) -0.00s (- 0.18%) 1.79s 1.81s
Bind Time 0.85s (± 0.00%) 0.84s (± 0.89%) -0.01s (- 0.98%) 0.83s 0.85s
Check Time 10.36s (± 0.57%) 10.42s (± 0.48%) +0.06s (+ 0.63%) 10.36s 10.47s
Emit Time 3.06s (± 1.52%) 3.07s (± 0.87%) +0.01s (+ 0.49%) 3.05s 3.12s
Total Time 16.07s (± 0.52%) 16.14s (± 0.40%) +0.07s (+ 0.44%) 16.03s 16.19s
Monaco - node (v16.17.1, x64)
Memory used 343,261k (± 0.01%) 343,235k (± 0.01%) -26k (- 0.01%) 343,187k 343,303k
Parse Time 3.15s (± 1.40%) 3.18s (± 0.96%) +0.03s (+ 1.06%) 3.15s 3.22s
Bind Time 1.11s (± 0.37%) 1.12s (± 0.73%) +0.01s (+ 0.75%) 1.11s 1.13s
Check Time 7.71s (± 0.07%) 7.70s (± 0.46%) -0.01s (- 0.17%) 7.65s 7.75s
Emit Time 4.50s (± 0.77%) 4.52s (± 0.71%) +0.02s (+ 0.48%) 4.48s 4.57s
Total Time 16.48s (± 0.22%) 16.52s (± 0.36%) +0.04s (+ 0.26%) 16.45s 16.61s
TFS - node (v16.17.1, x64)
Memory used 299,768k (± 0.01%) 299,751k (± 0.01%) -16k (- 0.01%) 299,728k 299,781k
Parse Time 2.49s (± 1.47%) 2.48s (± 0.67%) -0.01s (- 0.33%) 2.46s 2.50s
Bind Time 1.26s (± 0.41%) 1.25s (± 0.41%) -0.00s (- 0.27%) 1.25s 1.26s
Check Time 7.18s (± 0.20%) 7.18s (± 0.34%) -0.00s (- 0.05%) 7.15s 7.21s
Emit Time 4.23s (± 0.83%) 4.21s (± 0.50%) -0.02s (- 0.36%) 4.19s 4.25s
Total Time 15.15s (± 0.30%) 15.12s (± 0.13%) -0.03s (- 0.20%) 15.09s 15.15s
material-ui - node (v16.17.1, x64)
Memory used 476,092k (± 0.02%) 476,061k (± 0.01%) -31k (- 0.01%) 475,985k 476,148k
Parse Time 3.70s (± 0.33%) 3.72s (± 0.31%) +0.02s (+ 0.41%) 3.70s 3.73s
Bind Time 1.02s (± 0.74%) 1.02s (± 0.40%) +0.00s (+ 0.33%) 1.02s 1.03s
Check Time 18.06s (± 0.23%) 18.09s (± 0.52%) +0.03s (+ 0.14%) 18.00s 18.26s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.78s (± 0.18%) 22.83s (± 0.40%) +0.05s (+ 0.21%) 22.76s 23.00s
xstate - node (v16.17.1, x64)
Memory used 546,227k (± 0.01%) 546,276k (± 0.03%) +50k (+ 0.01%) 546,154k 546,531k
Parse Time 4.75s (± 0.25%) 4.77s (± 0.48%) +0.02s (+ 0.49%) 4.74s 4.80s
Bind Time 1.81s (± 3.84%) 1.81s (± 3.92%) +0.00s (+ 0.18%) 1.67s 1.85s
Check Time 3.00s (± 2.69%) 2.99s (± 2.90%) -0.00s (- 0.11%) 2.95s 3.17s
Emit Time 0.09s (± 5.53%) 0.09s (± 4.45%) -0.00s (- 1.79%) 0.09s 0.10s
Total Time 9.65s (± 0.19%) 9.67s (± 0.34%) +0.03s (+ 0.29%) 9.62s 9.71s
Angular - node (v14.15.1, x64)
Memory used 352,833k (± 0.00%) 352,832k (± 0.01%) -1k (- 0.00%) 352,795k 352,898k
Parse Time 4.23s (± 0.28%) 4.24s (± 0.41%) +0.01s (+ 0.24%) 4.22s 4.26s
Bind Time 1.28s (± 0.59%) 1.28s (± 0.80%) +0.00s (+ 0.13%) 1.27s 1.30s
Check Time 9.70s (± 0.36%) 9.69s (± 0.59%) -0.01s (- 0.14%) 9.64s 9.76s
Emit Time 8.34s (± 0.66%) 8.40s (± 0.41%) +0.06s (+ 0.66%) 8.33s 8.42s
Total Time 23.55s (± 0.32%) 23.61s (± 0.42%) +0.06s (+ 0.25%) 23.49s 23.73s
Compiler-Unions - node (v14.15.1, x64)
Memory used 189,081k (± 0.02%) 189,118k (± 0.05%) +38k (+ 0.02%) 189,039k 189,303k
Parse Time 1.84s (± 0.44%) 1.84s (± 0.80%) -0.00s (- 0.09%) 1.82s 1.86s
Bind Time 0.86s (± 0.48%) 0.86s (± 0.47%) +0.00s (+ 0.39%) 0.86s 0.87s
Check Time 10.37s (± 0.58%) 10.41s (± 0.54%) +0.04s (+ 0.34%) 10.37s 10.52s
Emit Time 3.48s (± 1.16%) 3.42s (± 4.15%) -0.05s (- 1.49%) 3.14s 3.54s
Total Time 16.55s (± 0.47%) 16.53s (± 0.59%) -0.02s (- 0.10%) 16.35s 16.63s
Monaco - node (v14.15.1, x64)
Memory used 338,020k (± 0.00%) 338,024k (± 0.01%) +5k (+ 0.00%) 337,965k 338,055k
Parse Time 3.25s (± 1.22%) 3.25s (± 1.33%) +0.00s (+ 0.05%) 3.21s 3.33s
Bind Time 1.11s (± 1.14%) 1.11s (± 0.47%) -0.00s (- 0.30%) 1.10s 1.11s
Check Time 8.02s (± 0.30%) 8.07s (± 0.49%) +0.05s (+ 0.64%) 8.02s 8.11s
Emit Time 4.75s (± 0.64%) 4.75s (± 0.32%) -0.00s (- 0.07%) 4.73s 4.76s
Total Time 17.13s (± 0.34%) 17.18s (± 0.45%) +0.05s (+ 0.28%) 17.09s 17.30s
TFS - node (v14.15.1, x64)
Memory used 294,589k (± 0.01%) 294,579k (± 0.00%) -10k (- 0.00%) 294,561k 294,594k
Parse Time 2.75s (± 0.44%) 2.76s (± 0.65%) +0.01s (+ 0.49%) 2.73s 2.78s
Bind Time 1.10s (± 0.74%) 1.11s (± 0.46%) +0.01s (+ 0.91%) 1.11s 1.12s
Check Time 7.52s (± 0.86%) 7.48s (± 0.66%) -0.04s (- 0.53%) 7.44s 7.57s
Emit Time 4.62s (± 0.71%) 4.63s (± 0.88%) +0.01s (+ 0.25%) 4.59s 4.68s
Total Time 15.99s (± 0.48%) 15.98s (± 0.30%) -0.01s (- 0.03%) 15.93s 16.05s
material-ui - node (v14.15.1, x64)
Memory used 471,556k (± 0.00%) 471,559k (± 0.00%) +3k (+ 0.00%) 471,525k 471,574k
Parse Time 3.92s (± 0.44%) 3.93s (± 0.57%) +0.01s (+ 0.17%) 3.91s 3.97s
Bind Time 1.04s (± 0.52%) 1.05s (± 1.27%) +0.00s (+ 0.32%) 1.03s 1.07s
Check Time 19.04s (± 0.46%) 19.06s (± 0.45%) +0.03s (+ 0.13%) 18.92s 19.17s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 24.00s (± 0.40%) 24.04s (± 0.37%) +0.04s (+ 0.15%) 23.88s 24.14s
xstate - node (v14.15.1, x64)
Memory used 534,457k (± 0.01%) 534,444k (± 0.01%) -13k (- 0.00%) 534,384k 534,484k
Parse Time 5.16s (± 0.55%) 5.17s (± 0.89%) +0.01s (+ 0.13%) 5.12s 5.23s
Bind Time 1.71s (± 0.86%) 1.72s (± 0.88%) +0.01s (+ 0.29%) 1.69s 1.73s
Check Time 3.09s (± 0.60%) 3.10s (± 0.73%) +0.01s (+ 0.43%) 3.06s 3.13s
Emit Time 0.10s (± 0.00%) 0.10s (± 0.00%) 0.00s ( 0.00%) 0.10s 0.10s
Total Time 10.06s (± 0.39%) 10.09s (± 0.50%) +0.03s (+ 0.26%) 10.02s 10.16s
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 (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 52422 6
Baseline main 6

TSServer

Comparison Report - main..52422
Metric main 52422 Delta Best Worst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,493ms (± 1.17%) 2,497ms (± 1.11%) +4ms (+ 0.16%) 2,467ms 2,526ms
Req 2 - geterr 5,502ms (± 0.71%) 5,508ms (± 0.65%) +6ms (+ 0.11%) 5,461ms 5,562ms
Req 3 - references 367ms (± 1.04%) 365ms (± 1.58%) -2ms (- 0.55%) 356ms 372ms
Req 4 - navto 284ms (± 0.18%) 285ms (± 0.48%) +1ms (+ 0.35%) 284ms 287ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 68ms (± 3.52%) 67ms (± 3.24%) -2ms (- 2.20%) 65ms 71ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,729ms (± 1.73%) 2,771ms (± 1.47%) +42ms (+ 1.54%) 2,713ms 2,816ms
Req 2 - geterr 4,054ms (± 0.36%) 4,056ms (± 0.42%) +2ms (+ 0.06%) 4,027ms 4,073ms
Req 3 - references 370ms (± 0.70%) 370ms (± 0.63%) 0ms ( 0.00%) 365ms 371ms
Req 4 - navto 297ms (± 0.80%) 298ms (± 0.97%) +1ms (+ 0.34%) 294ms 302ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 78ms (± 6.38%) 82ms (± 0.92%) +4ms (+ 5.34%) 81ms 83ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,494ms (± 0.72%) 3,508ms (± 0.63%) +14ms (+ 0.39%) 3,486ms 3,547ms
Req 2 - geterr 1,426ms (± 0.96%) 1,419ms (± 0.95%) -8ms (- 0.53%) 1,401ms 1,433ms
Req 3 - references 103ms (± 0.73%) 104ms (± 2.00%) +1ms (+ 0.65%) 101ms 106ms
Req 4 - navto 355ms (± 0.66%) 357ms (± 0.72%) +2ms (+ 0.61%) 354ms 361ms
Req 5 - completionInfo count 3,171 (± 0.00%) 3,171 (± 0.00%) 0 ( 0.00%) 3,171 3,171
Req 5 - completionInfo 467ms (± 1.21%) 444ms (± 1.48%) 🟩-23ms (- 4.92%) 434ms 453ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,770ms (± 0.61%) 2,779ms (± 0.77%) +10ms (+ 0.34%) 2,742ms 2,805ms
Req 2 - geterr 5,861ms (± 0.39%) 5,879ms (± 0.52%) +18ms (+ 0.31%) 5,847ms 5,918ms
Req 3 - references 378ms (± 1.35%) 379ms (± 1.05%) +1ms (+ 0.26%) 374ms 385ms
Req 4 - navto 277ms (± 0.63%) 277ms (± 1.18%) -0ms (- 0.06%) 273ms 280ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 74ms (±10.05%) 76ms (±10.88%) +2ms (+ 2.69%) 70ms 88ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,926ms (± 0.29%) 2,951ms (± 0.93%) +25ms (+ 0.87%) 2,917ms 2,992ms
Req 2 - geterr 4,397ms (± 0.48%) 4,403ms (± 0.26%) +7ms (+ 0.15%) 4,386ms 4,418ms
Req 3 - references 379ms (± 0.63%) 380ms (± 0.83%) +1ms (+ 0.31%) 376ms 384ms
Req 4 - navto 288ms (± 0.53%) 289ms (± 0.80%) +2ms (+ 0.58%) 286ms 293ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 72ms (± 1.63%) 72ms (± 1.04%) +0ms (+ 0.46%) 71ms 73ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,627ms (± 0.36%) 3,641ms (± 0.47%) +14ms (+ 0.39%) 3,618ms 3,670ms
Req 2 - geterr 1,562ms (± 0.95%) 1,564ms (± 0.91%) +2ms (+ 0.10%) 1,543ms 1,580ms
Req 3 - references 112ms (± 1.22%) 112ms (± 1.68%) -1ms (- 0.74%) 109ms 114ms
Req 4 - navto 344ms (± 1.07%) 342ms (± 1.26%) -2ms (- 0.53%) 338ms 349ms
Req 5 - completionInfo count 3,171 (± 0.00%) 3,171 (± 0.00%) 0 ( 0.00%) 3,171 3,171
Req 5 - completionInfo 479ms (± 0.34%) 453ms (± 1.16%) 🟩-26ms (- 5.42%) 445ms 460ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,903ms (± 0.41%) 2,905ms (± 0.33%) +2ms (+ 0.06%) 2,895ms 2,921ms
Req 2 - geterr 6,278ms (± 0.58%) 6,311ms (± 0.46%) +33ms (+ 0.52%) 6,268ms 6,339ms
Req 3 - references 390ms (± 0.43%) 393ms (± 1.17%) +3ms (+ 0.85%) 389ms 402ms
Req 4 - navto 280ms (± 1.18%) 283ms (± 1.06%) +3ms (+ 0.95%) 280ms 287ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 91ms (± 2.59%) 90ms (± 2.88%) -1ms (- 0.92%) 87ms 92ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,067ms (± 0.27%) 3,106ms (± 1.07%) +39ms (+ 1.26%) 3,075ms 3,150ms
Req 2 - geterr 4,681ms (± 0.38%) 4,686ms (± 0.57%) +6ms (+ 0.12%) 4,641ms 4,717ms
Req 3 - references 408ms (± 1.61%) 403ms (± 0.69%) -6ms (- 1.35%) 399ms 406ms
Req 4 - navto 292ms (± 0.85%) 292ms (± 0.42%) -1ms (- 0.23%) 290ms 293ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 81ms (± 3.44%) 80ms (± 1.02%) -1ms (- 1.23%) 79ms 81ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,961ms (± 0.69%) 3,972ms (± 0.68%) +12ms (+ 0.30%) 3,923ms 3,995ms
Req 2 - geterr 1,502ms (± 0.56%) 1,515ms (± 1.53%) +14ms (+ 0.91%) 1,483ms 1,555ms
Req 3 - references 134ms (± 3.30%) 131ms (± 2.91%) -3ms (- 1.99%) 124ms 135ms
Req 4 - navto 375ms (± 0.88%) 373ms (± 0.88%) -2ms (- 0.49%) 369ms 378ms
Req 5 - completionInfo count 3,171 (± 0.00%) 3,171 (± 0.00%) 0 ( 0.00%) 3,171 3,171
Req 5 - completionInfo 502ms (± 2.07%) 479ms (± 1.29%) 🟩-23ms (- 4.65%) 472ms 489ms
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 (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
Benchmark Name Iterations
Current 52422 6
Baseline main 6

Startup

Comparison Report - main..52422
Metric main 52422 Delta Best Worst
tsc-startup - node (v16.17.1, x64)
Execution time 142.01ms (± 0.17%) 142.45ms (± 0.17%) +0.43ms (+ 0.30%) 141.86ms 145.98ms
tsserver-startup - node (v16.17.1, x64)
Execution time 225.89ms (± 0.16%) 226.88ms (± 0.14%) +0.99ms (+ 0.44%) 225.97ms 231.80ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 228.21ms (± 0.19%) 229.09ms (± 0.14%) +0.88ms (+ 0.39%) 228.06ms 233.08ms
typescript-startup - node (v16.17.1, x64)
Execution time 209.15ms (± 0.17%) 209.95ms (± 0.16%) +0.79ms (+ 0.38%) 209.14ms 214.54ms
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
  • 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 52422 6
Baseline main 6

Developer Information:

Download Benchmark

@DanielRosenwasser
Copy link
Member

@typescript-bot user test tsserver
@typescript-bot test tsserver top100

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 26, 2023

Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite (tsserver) on this PR at 638dd64. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 26, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser Here are the results of running the top-repos suite comparing main and refs/pull/52422/merge:

Something interesting changed - please have a look.

Details

backstage/backstage

⚠️ Note that built also had errors ⚠️
Exited unexpectedly with signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

That is a filtered view of the text. To see the raw error text, go to RepoResults4/backstage.backstage.rawError.txt in the artifact folder

Last few requests

{"seq":5049,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/plugins/catalog-backend-module-azure/src/providers/AzureDevOpsEntityProvider.test.ts","line":289,"offset":25,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":2,"triggerCharacter":"."}}
{"seq":5050,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/plugins/catalog-backend-module-azure/src/providers/AzureDevOpsEntityProvider.test.ts","line":292,"offset":11}}
{"seq":5051,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":["@PROJECT_ROOT@/plugins/catalog-backend-module-aws/src/service/AwsS3EntityProviderCatalogModule.ts"],"openFiles":[]}}
{"seq":5052,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/plugins/catalog-backend-module-bitbucket-cloud/config.d.ts","projectRootPath":"@PROJECT_ROOT@"}]}}

Repro Steps

  1. git clone https://github.com/backstage/backstage --recurse-submodules
  2. In dir backstage, run git reset --hard f5d0a28c406d784562ad23d4e2c8c59433d07b0d
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir backstage/cypress, run yarn install --no-immutable --mode=skip-build
    2. In dir backstage/microsite-next, run yarn install --no-immutable --mode=skip-build
    3. In dir backstage/microsite, run yarn install --no-immutable --mode=skip-build
    4. In dir backstage, run yarn install --no-immutable --mode=skip-build
    5. In dir backstage/storybook, run yarn install --no-immutable --mode=skip-build
  4. Back in the initial folder, download RepoResults4/backstage.backstage.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./backstage ./backstage.backstage.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

palantir/blueprint

⚠️ Note that built also had errors ⚠️
Req #19161 - references
    at getEffectiveCallArguments (/typescript-main/built/local/tsserver.js:73467:37)
    at getContextualTypeForArgument (/typescript-main/built/local/tsserver.js:70356:18)
    at getContextualType2 (/typescript-main/built/local/tsserver.js:70799:16)
    at getApparentTypeOfContextualType (/typescript-main/built/local/tsserver.js:70735:120)
    at getContextualType2 (/typescript-main/built/local/tsserver.js:70814:22)
    at getApparentTypeOfContextualType (/typescript-main/built/local/tsserver.js:70735:120)
    at getContextualSignature (/typescript-main/built/local/tsserver.js:71102:18)
    at getNarrowedTypeOfSymbol (/typescript-main/built/local/tsserver.js:69551:39)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69643:16)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-main/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-main/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-main/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-main/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-main/built/local/tsserver.js:72178:29)
Req #19161 - references
    at getJSDocType (/typescript-52422/built/local/tsserver.js:14097:22)
    at getEffectiveTypeAnnotationNode (/typescript-52422/built/local/tsserver.js:18658:91)
    at /typescript-52422/built/local/tsserver.js:20989:39
    at some (/typescript-52422/built/local/tsserver.js:2815:13)
    at hasContextSensitiveParameters (/typescript-52422/built/local/tsserver.js:20989:9)
    at isContextSensitiveFunctionLikeDeclaration (/typescript-52422/built/local/tsserver.js:62247:12)
    at isContextSensitiveFunctionOrObjectLiteralMethod (/typescript-52422/built/local/tsserver.js:62253:90)
    at getNarrowedTypeOfSymbol (/typescript-52422/built/local/tsserver.js:69550:44)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69643:16)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at getEffectsSignature (/typescript-52422/built/local/tsserver.js:68254:22)
    at getTypeAtFlowCall (/typescript-52422/built/local/tsserver.js:68593:25)
    at getTypeAtFlowNode (/typescript-52422/built/local/tsserver.js:68479:18)
    at getFlowTypeOfReference (/typescript-52422/built/local/tsserver.js:68436:45)
    at checkIdentifier (/typescript-52422/built/local/tsserver.js:69685:22)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77743:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)
    at checkPropertyAccessExpression (/typescript-52422/built/local/tsserver.js:72257:162)
    at checkExpressionWorker (/typescript-52422/built/local/tsserver.js:77777:16)
    at checkExpression (/typescript-52422/built/local/tsserver.js:77697:32)
    at checkNonNullExpression (/typescript-52422/built/local/tsserver.js:72178:29)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/palantir.blueprint.rawError.txt in the artifact folder

Last few requests

{"seq":19158,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":250305}}
{"seq":19159,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":250423,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}
{"seq":19160,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":250423,"entryNames":["arguments"]}}
{"seq":19161,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":250592}}

Repro Steps

  1. git clone https://github.com/palantir/blueprint --recurse-submodules
  2. In dir blueprint, run git reset --hard eec7f23d15552c668c890639a5b1f521a9d681e2
  3. In dir blueprint, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults4/palantir.blueprint.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./blueprint ./palantir.blueprint.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@andrewbranch
Copy link
Member Author

Cool, it does look like this gives a 5% improvement to completions on xstate!

@andrewbranch andrewbranch marked this pull request as ready for review January 26, 2023 17:46
Comment on lines +3666 to +3667
let ambientModuleCache: Map<Symbol, boolean> | undefined;
let sourceFileCache: Map<SourceFile, boolean> | undefined;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we typically use the symbols or nodes themselves as cache keys; all caches I've dealt with or added use symbol/node IDs instead; not sure if that's intentional or not, though.

Copy link
Member

Choose a reason for hiding this comment

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

i think this should be ok now that we are using native maps and life of this cache is well maintained..

Copy link
Member

Choose a reason for hiding this comment

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

That does make me wonder if we'd gain anything by switching all of the other caches to work directly...

Copy link
Member Author

@andrewbranch andrewbranch Jan 26, 2023

Choose a reason for hiding this comment

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

I had a vague memory of someone saying using the object instead of ids is preferred now. But I don’t know if there’s a real difference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can @rbuckton or @DanielRosenwasser advise on this?

Copy link
Member

Choose a reason for hiding this comment

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

Node IDs are set to 0 unconditionally, and set lazily when we need to use a Node in a Map or WeakMap. I tried to remove some usages out of the compiler and didn't find a ton of wins.

#46595

The biggest risk here is that you keep a PackageJsonFilter around across language service operations - leading to either a memory leak, or corrupt state. A WeakMap works, but I'd rather we just be a little careful about how we use these.

So I agree with Sheetal - the cache doesn't escape so we should be okay with these - just make sure the PackageJsonFilter object doesn't either.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, let me rephrase that - using objects/sparse arrays over Maps actually is a win, but not if you rely on iteration order.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this object only lasts a single request.

@andrewbranch andrewbranch merged commit 7d8f6ee into microsoft:main Feb 6, 2023
@andrewbranch andrewbranch deleted the perf/auto-import-package-json-filter-cache branch February 6, 2023 19:33
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.

5 participants