Uh oh!
There was an error while loading. Please reload this page.
Allow tsc to be run within a node v8 snapshot - #55830
Allow tsc to be run within a node v8 snapshot#55830Jake Bailey (jakebailey) wants to merge 18 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Jake Bailey (jakebailey)
commented
Sep 30, 2023
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: Hard to say whether or not this is worth it when we're not shipping the blobs themselves (which, we can't). |
Jake Bailey (jakebailey)
commented
Jan 9, 2024
TypeScript Bot (@typescript-bot) perf test |
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! |
Jake Bailey (jakebailey)
commented
Jan 9, 2024
TypeScript Bot (@typescript-bot) perf test |
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 (typescript-bot)
commented
Jan 9, 2024
Jake Bailey (@jakebailey), the perf run you requested failed. You can check the log here. |
TypeScript Bot (typescript-bot)
commented
Jan 9, 2024
Jake Bailey (@jakebailey) Here they are:startupComparison Report - baseline..pr
System info unknown Hosts
Scenarios
tscComparison Report - baseline..pr
System info unknown Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Jake Bailey (jakebailey)
commented
Jan 10, 2024
So far: 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. |
Jake Bailey (jakebailey)
commented
Mar 29, 2024
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' |
Jake Bailey (jakebailey)
commented
Apr 16, 2024
TypeScript Bot (@typescript-bot) perf test |
TypeScript Bot (typescript-bot)
commented
Apr 16, 2024
Jake Bailey (@jakebailey) Here they are:tscComparison Report - baseline..pr
System info unknown Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown Hosts
Scenarios
startupComparison Report - baseline..pr
System info unknown Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Jake Bailey (jakebailey)
commented
Jun 3, 2024
Per #55830 (comment), I'm going to close this. I think the future of caching is going to be via Node directly. |
This PR switches
tsc.jsto a wrapper which:tsc.jsand the Node version to choose a path a snapshot.Startup speed of the wrapper (as of Feb 13, 2024):
If we just run the blob directly without the wrapper, the speedup would be a lot more:
But there's no easy way to have Node do this.
Related: #25658