Skip to content

Allow tsc to be run within a node v8 snapshot - #55830

Closed
Jake Bailey (jakebailey) wants to merge 18 commits into
microsoft:mainfrom
jakebailey:node-snapshotting
Closed

Allow tsc to be run within a node v8 snapshot#55830
Jake Bailey (jakebailey) wants to merge 18 commits into
microsoft:mainfrom
jakebailey:node-snapshotting

Conversation

@jakebailey

@jakebaileyJake Bailey (jakebailey) commented Sep 22, 2023

Copy link
Copy Markdown
Member

This PR switches tsc.js to a wrapper which:

  • Hashes the contents of tsc.js and the Node version to choose a path a snapshot.
  • Checks to see if a cached snapshot is available.
  • If it is, execs that snapshot in a subprocess, passing stdio through.
  • If it isn't, creates a snapshot on a background thread, while running tsc in the foreground.

Startup speed of the wrapper (as of Feb 13, 2024):

Benchmark 1: node ./built/local/tsc.js --version
Time (mean ± σ): 55.4 ms ± 0.7 ms [User: 40.2 ms, System: 14.3 ms]
Range (min … max): 54.1 ms … 57.5 ms 53 runs
Benchmark 2: node ./built/local/tscReal.js --version
Time (mean ± σ): 88.9 ms ± 0.7 ms [User: 73.3 ms, System: 15.1 ms]
Range (min … max): 86.9 ms … 90.5 ms 33 runs
Benchmark 3: ./tscBun --version
Time (mean ± σ): 104.6 ms ± 1.0 ms [User: 96.4 ms, System: 10.2 ms]
Range (min … max): 102.6 ms … 106.8 ms 28 runs
Summary
'node ./built/local/tsc.js --version' ran
1.61 ± 0.02 times faster than 'node ./built/local/tscReal.js --version'
1.89 ± 0.03 times faster than './tscBun --version'

If we just run the blob directly without the wrapper, the speedup would be a lot more:

$ hyperfine 'node ./built/local/tsc.js --version' 'node --snapshot-blob snapshot.blob -- --version'
Benchmark 1: node ./built/local/tsc.js --version
Time (mean ± σ): 90.7 ms ± 1.6 ms [User: 78.9 ms, System: 11.5 ms]
Range (min … max): 87.1 ms … 94.1 ms 31 runs
Benchmark 2: node --snapshot-blob snapshot.blob -- --version
Time (mean ± σ): 29.4 ms ± 0.9 ms [User: 19.4 ms, System: 9.0 ms]
Range (min … max): 27.7 ms … 32.3 ms 98 runs
Summary
'node --snapshot-blob snapshot.blob -- --version' ran
3.09 ± 0.11 times faster than 'node ./built/local/tsc.js --version'

But there's no easy way to have Node do this.

Related: #25658

Comment threadsrc/tsc/tsc.ts Outdated
Comment threadsrc/tsc/tsc.ts Outdated
Comment threadsrc/tsc/tsconfig.json
@jakebailey

Copy link
Copy Markdown
MemberAuthor

I made an alternative entrypoint which is able to create a snapshot on the fly and use it for further executions. Even in the best case where I don't check that the file hasn't change, it doesn't really save all that much:

$ hyperfine -w 10 'node ./built/local/tsc.js --version' 'node ./snapshotify.js ./built/local/tsc.js --version'
Benchmark 1: node ./built/local/tsc.js --version
Time (mean ± σ): 89.0 ms ± 1.1 ms [User: 78.0 ms, System: 10.8 ms]
Range (min … max): 86.9 ms … 91.1 ms 33 runs
Benchmark 2: node ./snapshotify.js ./built/local/tsc.js --version
Time (mean ± σ): 49.4 ms ± 1.1 ms [User: 35.2 ms, System: 13.4 ms]
Range (min … max): 47.4 ms … 53.9 ms 59 runs
Summary
'node ./snapshotify.js ./built/local/tsc.js --version' ran
1.80 ± 0.05 times faster than 'node ./built/local/tsc.js --version'
$ hyperfine -w 10 'node ./built/local/tsc.js -p scripts' 'node ./snapshotify.js ./built/local/tsc.js -p scripts'
Benchmark 1: node ./built/local/tsc.js -p scripts
Time (mean ± σ): 1.951 s ± 0.041 s [User: 4.422 s, System: 0.179 s]
Range (min … max): 1.888 s … 2.012 s 10 runs
Benchmark 2: node ./snapshotify.js ./built/local/tsc.js -p scripts
Time (mean ± σ): 1.811 s ± 0.027 s [User: 4.257 s, System: 0.149 s]
Range (min … max): 1.780 s … 1.860 s 10 runs
Summary
'node ./snapshotify.js ./built/local/tsc.js -p scripts' ran
1.08 ± 0.03 times faster than 'node ./built/local/tsc.js -p scripts'

Hard to say whether or not this is worth it when we're not shipping the blobs themselves (which, we can't).

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the regular perf test suite on this PR at 75c9404. You can monitor the build here.

Update: The results are in!

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the regular perf test suite on this PR at e43ced9. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey), the perf run you requested failed. You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time153.95ms (± 0.21%)108.73ms (±13.06%)🟩-45.22ms (-29.38%)105.72ms585.97msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time229.16ms (± 0.16%)229.27ms (± 0.18%)+0.10ms (+ 0.04%)227.91ms235.26msp=0.044 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time230.86ms (± 0.16%)230.68ms (± 0.17%)-0.18ms (- 0.08%)229.08ms233.46msp=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time231.39ms (± 0.17%)231.39ms (± 0.19%)~229.89ms237.03msp=0.832 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,507k (± 0.01%)408,607k (±13.53%)🔻+113,100k (+38.27%)295,670k431,590kp=0.005 n=6
Parse Time2.65s (± 0.24%)2.65s (± 4.90%)~2.57s2.91sp=0.060 n=6
Bind Time0.82s (± 0.00%)0.82s (± 0.99%)~0.81s0.83sp=0.290 n=6
Check Time8.16s (± 0.39%)8.16s (± 0.40%)~8.12s8.20sp=0.936 n=6
Emit Time7.11s (± 0.44%)7.11s (± 0.21%)~7.08s7.12sp=1.000 n=6
Total Time18.74s (± 0.20%)18.74s (± 0.71%)~18.65s19.00sp=0.228 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used192,427k (± 0.70%)251,505k (±12.21%)🔻+59,078k (+30.70%)191,757k277,135kp=0.013 n=6
Parse Time1.35s (± 0.87%)1.39s (± 9.46%)~1.33s1.66sp=0.506 n=6
Bind Time0.72s (± 0.00%)0.73s (± 0.87%)+0.01s (+ 1.39%)0.72s0.74sp=0.008 n=6
Check Time9.37s (± 0.44%)9.24s (± 0.85%)-0.13s (- 1.39%)9.18s9.39sp=0.036 n=6
Emit Time2.63s (± 0.39%)2.77s (± 4.17%)~2.61s2.86sp=0.120 n=6
Total Time14.06s (± 0.39%)14.12s (± 1.15%)~13.90s14.40sp=0.377 n=6
Monaco - node (v18.15.0, x64)
Memory used347,424k (± 0.00%)428,209k (± 9.22%)🔻+80,786k (+23.25%)347,548k444,397kp=0.005 n=6
Parse Time2.47s (± 0.47%)2.50s (± 5.49%)~2.44s2.78sp=0.084 n=6
Bind Time0.93s (± 0.44%)0.92s (± 0.97%)~0.91s0.93sp=0.086 n=6
Check Time6.90s (± 0.53%)6.87s (± 0.45%)~6.84s6.92sp=0.295 n=6
Emit Time4.05s (± 0.44%)4.04s (± 0.49%)~4.01s4.06sp=0.871 n=6
Total Time14.35s (± 0.29%)14.34s (± 0.99%)~14.25s14.62sp=0.148 n=6
TFS - node (v18.15.0, x64)
Memory used302,767k (± 0.01%)341,013k (± 5.70%)🔻+38,247k (+12.63%)302,944k355,352kp=0.005 n=6
Parse Time2.01s (± 1.31%)2.07s (± 6.37%)~2.00s2.34sp=0.466 n=6
Bind Time1.00s (± 0.83%)1.00s (± 0.51%)~1.00s1.01sp=0.923 n=6
Check Time6.31s (± 0.32%)6.30s (± 0.30%)~6.28s6.33sp=0.570 n=6
Emit Time3.57s (± 0.41%)3.58s (± 0.21%)~3.57s3.59sp=0.099 n=6
Total Time12.89s (± 0.32%)12.96s (± 1.09%)~12.86s13.24sp=0.467 n=6
material-ui - node (v18.15.0, x64)
Memory used508,271k (± 0.00%)528,146k (± 1.97%)+19,875k (+ 3.91%)508,460k540,028kp=0.005 n=6
Parse Time2.59s (± 0.62%)2.68s (± 4.45%)+0.09s (+ 3.48%)2.61s2.92sp=0.006 n=6
Bind Time0.99s (± 0.64%)0.90s (± 5.56%)🟩-0.09s (- 9.26%)0.87s1.00sp=0.046 n=6
Check Time17.08s (± 0.29%)17.46s (± 0.79%)+0.38s (+ 2.23%)17.21s17.59sp=0.005 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.66s (± 0.26%)21.04s (± 0.40%)+0.38s (+ 1.85%)20.96s21.14sp=0.005 n=6
xstate - node (v18.15.0, x64)
Memory used512,980k (± 0.01%)571,323k (± 4.62%)🔻+58,343k (+11.37%)517,526k584,054kp=0.005 n=6
Parse Time3.28s (± 0.33%)3.40s (± 3.34%)+0.12s (+ 3.61%)3.34s3.63sp=0.005 n=6
Bind Time1.54s (± 0.34%)1.43s (± 0.69%)🟩-0.11s (- 6.83%)1.42s1.45sp=0.004 n=6
Check Time2.84s (± 0.62%)2.82s (± 0.66%)~2.80s2.85sp=0.373 n=6
Emit Time0.07s (± 0.00%)0.07s (± 5.69%)~0.07s0.08sp=0.405 n=6
Total Time7.72s (± 0.19%)7.73s (± 1.75%)~7.65s8.01sp=0.065 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,349ms (± 0.48%)2,344ms (± 0.59%)~2,324ms2,359msp=0.520 n=6
Req 2 - geterr5,513ms (± 1.43%)5,492ms (± 1.16%)~5,413ms5,562msp=0.575 n=6
Req 3 - references323ms (± 0.36%)323ms (± 0.41%)~322ms325msp=0.739 n=6
Req 4 - navto273ms (± 1.22%)274ms (± 1.40%)~270ms278msp=0.615 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo87ms (± 8.83%)88ms (± 6.98%)~79ms93msp=1.000 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,480ms (± 0.92%)2,477ms (± 0.63%)~2,463ms2,504msp=0.689 n=6
Req 2 - geterr4,141ms (± 1.80%)4,165ms (± 1.96%)~4,076ms4,241msp=0.810 n=6
Req 3 - references336ms (± 1.76%)334ms (± 1.10%)~331ms341msp=0.871 n=6
Req 4 - navto285ms (± 1.07%)285ms (± 1.09%)~282ms291msp=0.933 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo83ms (± 8.93%)83ms (± 6.18%)~78ms90msp=1.000 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,596ms (± 0.77%)2,598ms (± 0.89%)~2,562ms2,617msp=0.936 n=6
Req 2 - geterr1,699ms (± 1.77%)1,711ms (± 2.58%)~1,647ms1,762msp=0.470 n=6
Req 3 - references116ms (± 9.63%)123ms (± 6.65%)~106ms126msp=0.346 n=6
Req 4 - navto365ms (± 0.22%)364ms (± 0.86%)~358ms366msp=0.796 n=6
Req 5 - completionInfo count2,073 (± 0.00%)2,073 (± 0.00%)~2,0732,073p=1.000 n=6
Req 5 - completionInfo305ms (± 1.90%)309ms (± 1.89%)~300ms315msp=0.376 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@jakebailey

Copy link
Copy Markdown
MemberAuthor

So far:

Benchmark 1: node ./built/local/tsc.js --version
Time (mean ± σ): 55.4 ms ± 0.7 ms [User: 40.2 ms, System: 14.3 ms]
Range (min … max): 54.1 ms … 57.5 ms 53 runs
Benchmark 2: node ./built/local/tscReal.js --version
Time (mean ± σ): 88.9 ms ± 0.7 ms [User: 73.3 ms, System: 15.1 ms]
Range (min … max): 86.9 ms … 90.5 ms 33 runs
Benchmark 3: ./tscBun --version
Time (mean ± σ): 104.6 ms ± 1.0 ms [User: 96.4 ms, System: 10.2 ms]
Range (min … max): 102.6 ms … 106.8 ms 28 runs
Summary
'node ./built/local/tsc.js --version' ran
1.61 ± 0.02 times faster than 'node ./built/local/tscReal.js --version'
1.89 ± 0.03 times faster than './tscBun --version'

The perf benchmarker does not do warmup runs, so it's a little unhappy. It fares worse than my machine at only a 30% startup boost.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

For those following this, native automatic caching in Node is able to achieve better perf than what I was able to do: nodejs/node#47472 (comment)

$ hyperfine -w 10 -r 100 'NODE_COMPILER_CACHE= $HOME/work/node/out/Release/node ./built/local/tsc.js --version''NODE_COMPILER_CACHE=./tmp $HOME/work/node/out/Release/node ./built/local/tsc.js --version'Benchmark 1: NODE_COMPILER_CACHE= $HOME/work/node/out/Release/node ./built/local/tsc.js --version Time (mean ± σ): 89.9 ms ± 1.4 ms [User: 77.9 ms, System: 11.1 ms] Range (min … max): 88.0 ms … 97.7 ms 100 runsBenchmark 2: NODE_COMPILER_CACHE=./tmp $HOME/work/node/out/Release/node ./built/local/tsc.js --version Time (mean ± σ): 39.9 ms ± 0.6 ms [User: 29.9 ms, System: 9.6 ms] Range (min … max): 38.7 ms … 42.6 ms 100 runsSummary 'NODE_COMPILER_CACHE=./tmp $HOME/work/node/out/Release/node ./built/local/tsc.js --version' ran 2.25 ± 0.05 times faster than 'NODE_COMPILER_CACHE= $HOME/work/node/out/Release/node ./built/local/tsc.js --version'

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
perf test✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used297,008k (± 0.01%)437,891k (± 1.51%)🔻+140,883k (+47.43%)431,920k446,430kp=0.005 n=6
Parse Time4.04s (± 0.49%)3.98s (± 0.25%)-0.06s (- 1.44%)3.97s3.99sp=0.005 n=6
Bind Time1.21s (± 0.69%)1.21s (± 0.69%)~1.20s1.22sp=0.796 n=6
Check Time12.10s (± 0.33%)12.12s (± 0.31%)~12.07s12.16sp=0.687 n=6
Emit Time10.50s (± 0.33%)10.59s (± 0.63%)+0.09s (+ 0.89%)10.50s10.70sp=0.020 n=6
Total Time27.86s (± 0.19%)27.91s (± 0.29%)~27.82s28.04sp=0.334 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used192,378k (± 0.77%)263,078k (± 0.32%)🔻+70,700k (+36.75%)262,019k264,139kp=0.005 n=6
Parse Time2.02s (± 0.37%)2.00s (± 1.72%)~1.97s2.05sp=0.373 n=6
Bind Time1.06s (± 1.03%)1.08s (± 0.78%)+0.02s (+ 1.42%)1.06s1.08sp=0.042 n=6
Check Time14.06s (± 0.34%)13.87s (± 0.62%)-0.19s (- 1.35%)13.72s13.95sp=0.005 n=6
Emit Time3.85s (± 1.28%)4.17s (± 0.88%)🔻+0.33s (+ 8.50%)4.11s4.22sp=0.005 n=6
Total Time20.98s (± 0.38%)21.11s (± 0.53%)~20.93s21.25sp=0.066 n=6
Monaco - node (v18.15.0, x64)
Memory used348,868k (± 0.01%)454,605k (± 0.03%)🔻+105,737k (+30.31%)454,485k454,816kp=0.005 n=6
Parse Time3.84s (± 0.71%)3.81s (± 0.64%)~3.76s3.83sp=0.076 n=6
Bind Time1.32s (± 0.68%)1.31s (± 0.62%)-0.01s (- 1.01%)1.30s1.32sp=0.038 n=6
Check Time10.28s (± 0.38%)10.29s (± 0.10%)~10.27s10.30sp=0.808 n=6
Emit Time6.00s (± 0.37%)5.99s (± 0.49%)~5.95s6.04sp=0.514 n=6
Total Time21.44s (± 0.28%)21.39s (± 0.14%)~21.36s21.44sp=0.142 n=6
TFS - node (v18.15.0, x64)
Memory used302,964k (± 0.01%)360,945k (± 1.45%)🔻+57,981k (+19.14%)350,223k363,178kp=0.005 n=6
Parse Time2.02s (± 0.60%)2.03s (± 0.98%)~2.00s2.05sp=0.615 n=6
Bind Time0.97s (± 0.53%)0.98s (± 0.91%)~0.97s0.99sp=0.190 n=6
Check Time6.43s (± 0.25%)6.45s (± 0.45%)~6.41s6.49sp=0.193 n=6
Emit Time3.58s (± 0.18%)3.59s (± 0.42%)~3.57s3.61sp=0.131 n=6
Total Time13.01s (± 0.21%)13.06s (± 0.18%)+0.05s (+ 0.40%)13.02s13.09sp=0.019 n=6
material-ui - node (v18.15.0, x64)
Memory used511,635k (± 0.00%)533,713k (± 0.93%)🔻+22,079k (+ 4.32%)523,840k537,013kp=0.005 n=6
Parse Time3.25s (± 0.61%)3.34s (± 0.54%)+0.09s (+ 2.61%)3.32s3.37sp=0.005 n=6
Bind Time1.19s (± 1.39%)1.04s (± 0.53%)🟩-0.15s (-12.66%)1.03s1.04sp=0.004 n=6
Check Time20.55s (± 0.37%)21.02s (± 0.45%)+0.47s (+ 2.30%)20.89s21.14sp=0.005 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time24.99s (± 0.34%)25.39s (± 0.40%)+0.40s (+ 1.61%)25.26s25.52sp=0.005 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,748,707k (± 0.00%)1,796,018k (± 1.42%)+47,311k (+ 2.71%)1,783,786k1,848,029kp=0.005 n=6
Parse Time8.10s (± 0.37%)8.43s (± 0.88%)🔻+0.33s (+ 4.05%)8.28s8.48sp=0.005 n=6
Bind Time2.74s (± 0.59%)2.24s (± 0.73%)🟩-0.50s (-18.23%)2.22s2.27sp=0.004 n=6
Check Time66.77s (± 0.37%)68.72s (± 0.51%)+1.95s (+ 2.93%)68.31s69.34sp=0.005 n=6
Emit Time0.17s (± 6.19%)0.17s (± 6.19%)~0.16s0.18sp=1.000 n=6
Total Time77.78s (± 0.35%)79.56s (± 0.35%)+1.79s (+ 2.30%)79.21s80.00sp=0.005 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,306,767k (± 0.05%)5,365,257k (±14.61%)🔻+3,058,491k (+132.59%)4,802,148k6,670,784kp=0.005 n=6
Parse Time7.39s (± 0.45%)7.55s (± 0.68%)+0.16s (+ 2.12%)7.48s7.63sp=0.005 n=6
Bind Time2.76s (± 0.82%)2.32s (± 1.60%)🟩-0.44s (-15.85%)2.28s2.38sp=0.005 n=6
Check Time49.39s (± 0.50%)45.50s (± 0.59%)🟩-3.89s (- 7.88%)45.09s45.81sp=0.005 n=6
Emit Time3.94s (± 1.58%)3.25s (± 2.00%)🟩-0.68s (-17.36%)3.14s3.33sp=0.005 n=6
Total Time63.48s (± 0.47%)58.63s (± 0.43%)🟩-4.84s (- 7.63%)58.18s58.92sp=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Memory used2,381,487k (± 0.05%)2,382,787k (± 0.03%)~2,381,369k2,383,747kp=0.093 n=6
Parse Time7.65s (± 0.42%)7.59s (± 1.13%)~7.43s7.67sp=0.199 n=6
Bind Time2.52s (± 0.71%)2.52s (± 0.82%)~2.48s2.54sp=0.871 n=6
Check Time49.72s (± 0.67%)49.83s (± 0.62%)~49.49s50.20sp=0.810 n=6
Emit Time3.90s (± 1.97%)3.95s (± 3.37%)~3.81s4.17sp=0.630 n=6
Total Time63.79s (± 0.53%)63.88s (± 0.58%)~63.46s64.39sp=0.936 n=6
self-compiler - node (v18.15.0, x64)
Memory used419,093k (± 0.01%)476,250k (± 1.27%)🔻+57,157k (+13.64%)470,629k486,500kp=0.005 n=6
Parse Time3.39s (± 0.52%)3.34s (± 0.52%)-0.06s (- 1.67%)3.32s3.37sp=0.006 n=6
Bind Time1.31s (± 0.89%)1.29s (± 0.76%)-0.02s (- 1.52%)1.28s1.30sp=0.022 n=6
Check Time18.02s (± 0.35%)18.08s (± 0.36%)~17.99s18.17sp=0.295 n=6
Emit Time1.37s (± 1.76%)1.38s (± 1.09%)~1.37s1.41sp=0.628 n=6
Total Time24.10s (± 0.17%)24.09s (± 0.29%)~24.00s24.16sp=1.000 n=6
vscode - node (v18.15.0, x64)
Memory used2,913,896k (± 0.00%)3,001,919k (± 1.83%)+88,023k (+ 3.02%)2,958,643k3,110,939kp=0.005 n=6
Parse Time11.24s (± 0.21%)11.22s (± 0.47%)~11.13s11.29sp=0.808 n=6
Bind Time3.41s (± 0.44%)3.40s (± 0.24%)-0.02s (- 0.49%)3.39s3.41sp=0.039 n=6
Check Time62.64s (± 0.51%)62.29s (± 0.45%)~61.85s62.58sp=0.149 n=6
Emit Time16.50s (± 0.56%)19.91s (± 0.75%)🔻+3.41s (+20.65%)19.65s20.08sp=0.005 n=6
Total Time93.78s (± 0.38%)96.82s (± 0.44%)+3.04s (+ 3.24%)96.02s97.13sp=0.005 n=6
webpack - node (v18.15.0, x64)
Memory used409,469k (± 0.01%)461,662k (± 0.99%)🔻+52,193k (+12.75%)452,358k464,503kp=0.005 n=6
Parse Time4.80s (± 0.92%)4.84s (± 1.43%)~4.75s4.95sp=0.228 n=6
Bind Time2.03s (± 0.48%)2.01s (± 0.98%)~2.00s2.05sp=0.058 n=6
Check Time21.00s (± 0.19%)20.96s (± 0.27%)~20.88s21.04sp=0.260 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time27.83s (± 0.13%)27.82s (± 0.23%)~27.75s27.93sp=0.369 n=6
xstate - node (v18.15.0, x64)
Memory used671,924k (± 0.01%)760,483k (± 0.05%)🔻+88,558k (+13.18%)760,169k761,089kp=0.005 n=6
Parse Time3.40s (± 0.40%)3.48s (± 0.16%)+0.07s (+ 2.06%)3.47s3.48sp=0.005 n=6
Bind Time1.57s (± 0.00%)1.43s (± 0.53%)🟩-0.14s (- 8.81%)1.42s1.44sp=0.003 n=6
Check Time2.90s (± 0.49%)2.90s (± 0.81%)~2.86s2.92sp=1.000 n=6
Emit Time0.02s (± 0.00%)0.02s (± 0.00%)~0.02s0.02sp=1.000 n=6
Total Time7.91s (± 0.24%)7.83s (± 0.23%)-0.08s (- 0.97%)7.80s7.85sp=0.005 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen3,499ms (± 0.34%)3,491ms (± 0.85%)~3,460ms3,532msp=0.575 n=6
Req 2 - geterr7,585ms (± 1.91%)7,668ms (± 1.92%)~7,465ms7,831msp=0.378 n=6
Req 3 - references426ms (± 0.48%)426ms (± 0.99%)~421ms431msp=0.936 n=6
Req 4 - navto337ms (± 0.79%)336ms (± 0.95%)~333ms340msp=0.625 n=6
Req 5 - completionInfo count1,357 (± 0.00%)1,357 (± 0.00%)~1,3571,357p=1.000 n=6
Req 5 - completionInfo117ms (± 7.58%)122ms (± 8.16%)~111ms135msp=0.375 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,516ms (± 0.86%)2,510ms (± 0.92%)~2,475ms2,539msp=0.575 n=6
Req 2 - geterr3,835ms (± 0.23%)3,909ms (± 2.07%)~3,831ms3,993msp=0.173 n=6
Req 3 - references307ms (± 0.82%)303ms (± 1.77%)~297ms310msp=0.146 n=6
Req 4 - navto228ms (± 0.28%)226ms (± 0.91%)~223ms228msp=0.129 n=6
Req 5 - completionInfo count1,519 (± 0.00%)1,519 (± 0.00%)~1,5191,519p=1.000 n=6
Req 5 - completionInfo84ms (± 0.62%)79ms (± 6.05%)~72ms84msp=0.103 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen3,167ms (± 0.28%)3,191ms (± 0.87%)~3,149ms3,230msp=0.093 n=6
Req 2 - geterr1,888ms (±12.20%)1,752ms (± 1.13%)~1,732ms1,790msp=0.872 n=6
Req 3 - references177ms (± 7.49%)154ms (± 0.86%)🟩-23ms (-12.90%)153ms156msp=0.012 n=6
Req 4 - navto496ms (±10.62%)430ms (± 0.67%)~426ms434msp=0.170 n=6
Req 5 - completionInfo count2,079 (± 0.00%)2,079 (± 0.00%)~2,0792,079p=1.000 n=6
Req 5 - completionInfo420ms (±10.94%)363ms (± 1.46%)~357ms372msp=0.108 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time153.92ms (± 0.16%)106.50ms (± 0.20%)🟩-47.42ms (-30.81%)105.79ms108.44msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time227.73ms (± 0.14%)227.77ms (± 0.16%)~226.32ms232.80msp=0.480 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time224.14ms (± 0.15%)224.14ms (± 0.18%)~222.64ms228.67msp=0.356 n=600
typescript-startup - node (v18.15.0, x64)
Execution time225.48ms (± 0.18%)225.52ms (± 0.15%)~223.83ms228.55msp=0.188 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@jakebailey

Copy link
Copy Markdown
MemberAuthor

Per #55830 (comment), I'm going to close this. I think the future of caching is going to be via Node directly.

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jakebailey@typescript-bot@Jack-Works