Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make tsserver and typingsInstaller thin wrappers around public API#55326

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jakebailey merged 14 commits intomicrosoft:mainfromjakebailey:thin-tsserver-wrapper
Mar 15, 2024

Conversation

@jakebailey
Copy link
Member

@jakebaileyjakebailey commentedAug 9, 2023
edited
Loading

If you check out the tsconfigs fortsserver andtypescript (previouslytsserverlibrary), you'll note that they're the same!typescript is just a plain reexport for public use, meaning thattsserver is a strict superset of the public API and could be implemented as a bundle which just imports the API. We already do this for vscode.dev, which adds a web host;tsserver is what adds the node host. The same thing is true fortypingsInstaller as well; we exported it in the public API in#53394.

This PR instead makes those projects import from the public API project. Then at bundle time, this import is replaced with a reference to a local./typescript.js. (In--no-bundle, this isn't done, and the original import still works.)

After this, we're down to only having copies of our code intypescript.js andtsc.js, where the latter is a significantly different bundle for performance reasons.

Package size report

Overall package size

BeforeAfterDiffDiff (percent)
Packed5.51 MiB3.76 MiB-1.74 MiB-31.66%
Unpacked30.18 MiB20.36 MiB-9.82 MiB-32.55%

Files

BeforeAfterDiffDiff (percent)
lib/tsserver.js8.19 MiB24.64 KiB-8.16 MiB-99.71%
lib/typingsInstaller.js1.67 MiB10.47 KiB-1.66 MiB-99.39%

mjbvz, oeyoews, ThisWillDoIt, and SuperchupuDev reacted with heart emojimrcego and eiinu reacted with rocket emojioeyoews reacted with eyes emoji
@typescript-bottypescript-bot added Author: Team For Uncommitted BugPR for untriaged, rejected, closed or missing bug labelsAug 9, 2023
@typescript-bot

This comment was marked as outdated.

@jakebailey

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@jakebaileyjakebailey changed the title[experiment] Make tsserver a thin wrapper around tsserverlibrary.js (rather, typescript.js)[experiment] Make tsserver a thin wrapper around APIAug 24, 2023
@jakebaileyjakebailey changed the title[experiment] Make tsserver a thin wrapper around APIMake tsserver and typingsInstaller thin wrappers around public APIMar 8, 2024
@jakebailey
Copy link
MemberAuthor

@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commentedMar 8, 2024
edited
Loading

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

CommandStatusResults
perf test this✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commentedMar 8, 2024
edited
Loading

Hey@jakebailey, I've packed this intoan installable tgz. You can install it for testing by referencing it in yourpackage.json like so:

{    "devDependencies": {        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/160244/artifacts?artifactName=tgz&fileId=B7289D42EBA0857A2E6D4A8DE5473F868A9A787C6A17B7FEEC1B2C4A629A480D02&fileName=/typescript-5.5.0-insiders.20240308.tgz"    }}

and then runningnpm install.


There is also a playgroundfor this build and annpm module you can use via"typescript": "npm:@typescript-deploys/pr-build@5.5.0-pr-55326-5".;

@typescript-bot
Copy link
Collaborator

@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 used295,523k (± 0.01%)295,528k (± 0.01%)~295,502k295,545kp=0.936 n=6
Parse Time2.66s (± 0.24%)2.67s (± 0.15%)+0.01s (+ 0.31%)2.66s2.67sp=0.033 n=6
Bind Time0.83s (± 0.62%)0.83s (± 1.40%)~0.82s0.85sp=0.542 n=6
Check Time8.23s (± 0.26%)8.21s (± 0.40%)~8.15s8.24sp=0.746 n=6
Emit Time7.13s (± 0.14%)7.16s (± 0.35%)~7.11s7.18sp=0.052 n=6
Total Time18.84s (± 0.13%)18.87s (± 0.23%)~18.82s18.93sp=0.326 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used192,771k (± 0.94%)191,535k (± 0.09%)~191,360k191,772kp=0.128 n=6
Parse Time1.36s (± 0.55%)1.35s (± 0.81%)~1.33s1.36sp=0.195 n=6
Bind Time0.72s (± 0.00%)0.72s (± 0.00%)~0.72s0.72sp=1.000 n=6
Check Time9.38s (± 0.38%)9.34s (± 0.26%)~9.32s9.38sp=0.053 n=6
Emit Time2.60s (± 0.46%)2.61s (± 0.61%)~2.59s2.63sp=0.492 n=6
Total Time14.07s (± 0.26%)14.02s (± 0.32%)~13.97s14.09sp=0.127 n=6
Monaco - node (v18.15.0, x64)
Memory used347,301k (± 0.01%)347,314k (± 0.01%)~347,276k347,349kp=0.520 n=6
Parse Time2.48s (± 0.22%)2.48s (± 0.42%)~2.46s2.49sp=0.663 n=6
Bind Time0.92s (± 0.90%)0.93s (± 0.56%)~0.92s0.93sp=0.923 n=6
Check Time6.96s (± 0.22%)6.95s (± 0.27%)~6.92s6.97sp=0.563 n=6
Emit Time4.07s (± 0.61%)4.07s (± 0.20%)~4.06s4.08sp=0.864 n=6
Total Time14.43s (± 0.16%)14.43s (± 0.12%)~14.40s14.44sp=0.935 n=6
TFS - node (v18.15.0, x64)
Memory used302,758k (± 0.01%)302,758k (± 0.01%)~302,740k302,780kp=0.873 n=6
Parse Time2.01s (± 0.49%)2.01s (± 0.86%)~1.99s2.04sp=0.869 n=6
Bind Time1.00s (± 1.26%)1.00s (± 0.98%)~0.99s1.02sp=0.672 n=6
Check Time6.34s (± 0.46%)6.35s (± 0.54%)~6.31s6.40sp=0.936 n=6
Emit Time3.61s (± 0.52%)3.60s (± 0.45%)~3.57s3.62sp=0.373 n=6
Total Time12.96s (± 0.23%)12.96s (± 0.28%)~12.92s13.02sp=0.936 n=6
material-ui - node (v18.15.0, x64)
Memory used511,200k (± 0.00%)511,205k (± 0.00%)~511,191k511,215kp=1.000 n=6
Parse Time2.66s (± 0.24%)2.66s (± 0.34%)~2.65s2.67sp=1.000 n=6
Bind Time0.98s (± 1.06%)0.99s (± 0.64%)~0.98s1.00sp=0.388 n=6
Check Time17.31s (± 0.62%)17.27s (± 0.38%)~17.18s17.35sp=0.520 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.96s (± 0.50%)20.93s (± 0.32%)~20.83s20.99sp=0.810 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,789,566k (± 0.00%)1,789,558k (± 0.00%)~1,789,532k1,789,599kp=0.630 n=6
Parse Time6.64s (± 0.38%)6.66s (± 0.43%)~6.63s6.71sp=0.746 n=6
Bind Time2.39s (± 0.00%)2.39s (± 0.17%)~2.38s2.39sp=0.405 n=6
Check Time58.82s (± 0.40%)58.98s (± 0.18%)~58.82s59.08sp=0.229 n=6
Emit Time0.16s (± 0.00%)0.16s (± 3.16%)~0.16s0.17sp=0.174 n=6
Total Time68.02s (± 0.35%)68.19s (± 0.17%)~68.02s68.34sp=0.199 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,394,354k (± 0.04%)2,394,144k (± 0.02%)~2,393,559k2,394,937kp=0.689 n=6
Parse Time5.05s (± 0.82%)5.07s (± 0.79%)~5.02s5.12sp=0.689 n=6
Bind Time1.89s (± 0.70%)1.90s (± 0.58%)~1.89s1.92sp=0.357 n=6
Check Time33.70s (± 0.33%)33.69s (± 0.28%)~33.57s33.78sp=0.873 n=6
Emit Time2.67s (± 0.70%)2.68s (± 1.80%)~2.64s2.77sp=0.630 n=6
Total Time43.34s (± 0.28%)43.34s (± 0.27%)~43.20s43.49sp=1.000 n=6
self-compiler - node (v18.15.0, x64)
Memory used414,494k (± 0.01%)414,507k (± 0.01%)~414,465k414,523kp=0.471 n=6
Parse Time2.81s (± 0.86%)2.81s (± 0.79%)~2.79s2.85sp=0.808 n=6
Bind Time1.07s (± 0.70%)1.07s (± 0.59%)~1.06s1.08sp=0.718 n=6
Check Time15.19s (± 0.38%)15.15s (± 0.22%)~15.11s15.20sp=0.172 n=6
Emit Time1.11s (± 1.33%)1.11s (± 1.67%)~1.09s1.13sp=0.677 n=6
Total Time20.18s (± 0.35%)20.14s (± 0.20%)~20.08s20.18sp=0.627 n=6
vscode - node (v18.15.0, x64)
Memory used2,865,706k (± 0.00%)2,865,735k (± 0.00%)~2,865,702k2,865,781kp=0.173 n=6
Parse Time10.78s (± 0.40%)10.77s (± 0.29%)~10.74s10.81sp=1.000 n=6
Bind Time3.44s (± 0.43%)3.44s (± 0.57%)~3.41s3.46sp=0.868 n=6
Check Time61.20s (± 0.56%)61.22s (± 0.47%)~60.93s61.57sp=0.810 n=6
Emit Time16.24s (± 0.93%)16.20s (± 0.38%)~16.14s16.28sp=0.688 n=6
Total Time91.66s (± 0.53%)91.63s (± 0.32%)~91.36s92.02sp=0.936 n=6
webpack - node (v18.15.0, x64)
Memory used397,043k (± 0.01%)397,066k (± 0.02%)~396,956k397,143kp=0.378 n=6
Parse Time3.12s (± 0.55%)3.13s (± 0.77%)~3.11s3.17sp=1.000 n=6
Bind Time1.39s (± 0.76%)1.39s (± 1.67%)~1.37s1.43sp=0.869 n=6
Check Time14.03s (± 0.41%)13.99s (± 0.41%)~13.88s14.05sp=0.462 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time18.53s (± 0.33%)18.50s (± 0.34%)~18.39s18.58sp=0.684 n=6
xstate - node (v18.15.0, x64)
Memory used513,137k (± 0.01%)513,159k (± 0.01%)~513,104k513,207kp=0.471 n=6
Parse Time3.27s (± 0.32%)3.28s (± 0.31%)~3.27s3.30sp=0.134 n=6
Bind Time1.54s (± 0.34%)1.54s (± 0.33%)~1.54s1.55sp=0.069 n=6
Check Time2.86s (± 0.36%)2.85s (± 0.42%)~2.84s2.87sp=0.211 n=6
Emit Time0.08s (± 0.00%)0.08s (± 0.00%)~0.08s0.08sp=1.000 n=6
Total Time7.75s (± 0.25%)7.75s (± 0.18%)~7.73s7.77sp=1.000 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-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 - updateOpen2,343ms (± 0.76%)2,342ms (± 0.74%)~2,322ms2,361msp=0.748 n=6
Req 2 - geterr5,610ms (± 1.10%)5,646ms (± 0.17%)~5,636ms5,661msp=0.230 n=6
Req 3 - references324ms (± 1.19%)323ms (± 0.89%)~321ms329msp=0.554 n=6
Req 4 - navto274ms (± 0.60%)272ms (± 0.19%)-2ms (- 0.67%)271ms272msp=0.039 n=6
Req 5 - completionInfo count1,357 (± 0.00%)1,357 (± 0.00%)~1,3571,357p=1.000 n=6
Req 5 - completionInfo91ms (± 6.30%)93ms (± 0.81%)~92ms94msp=0.340 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,506ms (± 0.86%)2,501ms (± 0.99%)~2,474ms2,529msp=0.471 n=6
Req 2 - geterr4,205ms (± 1.93%)4,279ms (± 0.16%)~4,266ms4,285msp=0.128 n=6
Req 3 - references338ms (± 1.50%)335ms (± 1.02%)~332ms340msp=0.418 n=6
Req 4 - navto285ms (± 0.29%)284ms (± 0.35%)~283ms285msp=0.181 n=6
Req 5 - completionInfo count1,519 (± 0.00%)1,519 (± 0.00%)~1,5191,519p=1.000 n=6
Req 5 - completionInfo86ms (± 7.08%)82ms (± 5.71%)~78ms88msp=0.155 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,603ms (± 0.47%)2,620ms (± 0.26%)+17ms (+ 0.63%)2,613ms2,631msp=0.025 n=6
Req 2 - geterr1,720ms (± 1.98%)1,744ms (± 1.79%)~1,716ms1,788msp=0.128 n=6
Req 3 - references124ms (± 7.12%)119ms (± 9.17%)~104ms128msp=0.119 n=6
Req 4 - navto371ms (± 0.43%)372ms (± 0.88%)~366ms375msp=0.289 n=6
Req 5 - completionInfo count2,079 (± 0.00%)2,079 (± 0.00%)~2,0792,079p=1.000 n=6
Req 5 - completionInfo307ms (± 1.82%)306ms (± 2.27%)~298ms314msp=0.936 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 time152.80ms (± 0.16%)152.74ms (± 0.17%)-0.06ms (- 0.04%)151.68ms157.24msp=0.010 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time229.15ms (± 0.16%)228.01ms (± 0.14%)-1.13ms (- 0.49%)226.30ms233.80msp=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time221.63ms (± 0.15%)221.64ms (± 0.15%)~220.05ms224.85msp=0.560 n=600
typescript-startup - node (v18.15.0, x64)
Execution time221.62ms (± 0.16%)221.72ms (± 0.16%)+0.10ms (+ 0.04%)220.15ms225.47msp=0.009 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
MemberAuthor

No perf impact, nice. (Was not expecting any, but still.)

@jakebaileyjakebailey marked this pull request as ready for reviewMarch 9, 2024 00:51
Copy link
Member

@weswighamweswigham left a comment
edited
Loading

Choose a reason for hiding this comment

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

Should we do aconst {...} = ts.server; at the top of the changed files, to keep the diff minimal and the accesses more static? Though I guess that won't work for types and we never added support forimport {...} = ts.server iirc.

@jakebailey
Copy link
MemberAuthor

Sure, let me give that a try, though I think most of these are actually types that change? Not sure if I can named import using animport = like that to grab the namespace...

Copy link
Member

@weswighamweswigham left a comment

Choose a reason for hiding this comment

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

Either way this is fine, it'd probably just be nice if we didn't have to do the longts.server everywhere in these files and could retain the short direct references.

@jakebailey
Copy link
MemberAuthor

I couldn't figure out how to get named imports from a nested object like that, but was able to do something slightly different by reexporting the namespaces through the older files, which keeps the diff minimal.

This won't really work for ESM but that's another day.

@jakebailey
Copy link
MemberAuthor

@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commentedMar 15, 2024
edited
Loading

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

CommandStatusResults
perf test this✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commentedMar 15, 2024
edited
Loading

Hey@jakebailey, I've packed this intoan installable tgz. You can install it for testing by referencing it in yourpackage.json like so:

{    "devDependencies": {        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/160436/artifacts?artifactName=tgz&fileId=B48BA0209CD400AD4C7FAB644A870E08C4DB5B3BA9699740862DA9D4B6CC2EA702&fileName=/typescript-5.5.0-insiders.20240315.tgz"    }}

and then runningnpm install.


There is also a playgroundfor this build and annpm module you can use via"typescript": "npm:@typescript-deploys/pr-build@5.5.0-pr-55326-12".;

@typescript-bot
Copy link
Collaborator

@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 used295,680k (± 0.01%)295,682k (± 0.01%)~295,653k295,710kp=0.470 n=6
Parse Time2.66s (± 0.19%)2.66s (± 0.41%)~2.65s2.68sp=0.324 n=6
Bind Time0.83s (± 0.49%)0.83s (± 0.66%)~0.82s0.83sp=0.282 n=6
Check Time8.22s (± 0.28%)8.22s (± 0.37%)~8.18s8.25sp=0.746 n=6
Emit Time7.16s (± 0.44%)7.15s (± 0.11%)~7.14s7.16sp=1.000 n=6
Total Time18.87s (± 0.20%)18.86s (± 0.14%)~18.82s18.88sp=0.568 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used194,367k (± 0.91%)193,207k (± 0.93%)~192,012k195,539kp=0.471 n=6
Parse Time1.36s (± 1.08%)1.36s (± 1.43%)~1.33s1.39sp=0.683 n=6
Bind Time0.72s (± 0.00%)0.72s (± 0.00%)~0.72s0.72sp=1.000 n=6
Check Time9.53s (± 0.48%)9.49s (± 0.56%)~9.43s9.56sp=0.228 n=6
Emit Time2.64s (± 0.65%)2.65s (± 0.53%)~2.63s2.67sp=0.370 n=6
Total Time14.26s (± 0.45%)14.22s (± 0.50%)~14.14s14.33sp=0.295 n=6
Monaco - node (v18.15.0, x64)
Memory used347,378k (± 0.00%)347,382k (± 0.00%)~347,371k347,391kp=0.748 n=6
Parse Time2.47s (± 0.49%)2.48s (± 0.47%)~2.46s2.49sp=0.507 n=6
Bind Time0.93s (± 0.90%)0.93s (± 0.68%)~0.92s0.94sp=0.226 n=6
Check Time7.02s (± 0.45%)7.01s (± 0.31%)~6.98s7.04sp=0.517 n=6
Emit Time4.08s (± 0.26%)4.07s (± 0.18%)~4.06s4.08sp=0.273 n=6
Total Time14.49s (± 0.18%)14.48s (± 0.19%)~14.43s14.51sp=0.514 n=6
TFS - node (v18.15.0, x64)
Memory used302,752k (± 0.01%)302,754k (± 0.01%)~302,711k302,777kp=0.873 n=6
Parse Time2.01s (± 0.81%)2.02s (± 0.49%)~2.01s2.03sp=0.934 n=6
Bind Time1.00s (± 0.41%)1.00s (± 1.09%)~0.99s1.02sp=1.000 n=6
Check Time6.30s (± 0.34%)6.32s (± 0.43%)~6.28s6.36sp=0.076 n=6
Emit Time3.60s (± 0.64%)3.61s (± 0.21%)~3.60s3.62sp=0.621 n=6
Total Time12.91s (± 0.21%)12.95s (± 0.14%)+0.04s (+ 0.34%)12.93s12.98sp=0.009 n=6
material-ui - node (v18.15.0, x64)
Memory used511,325k (± 0.01%)511,328k (± 0.01%)~511,275k511,395kp=1.000 n=6
Parse Time2.64s (± 0.50%)2.65s (± 0.65%)~2.63s2.67sp=0.235 n=6
Bind Time0.98s (± 0.85%)0.98s (± 0.77%)~0.97s0.99sp=0.652 n=6
Check Time17.33s (± 0.48%)17.36s (± 0.57%)~17.24s17.51sp=0.747 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.96s (± 0.43%)21.00s (± 0.47%)~20.88s21.15sp=0.630 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,798,063k (± 0.00%)1,798,076k (± 0.00%)~1,798,024k1,798,104kp=0.470 n=6
Parse Time6.64s (± 0.49%)6.62s (± 0.54%)~6.59s6.69sp=0.467 n=6
Bind Time2.38s (± 0.56%)2.39s (± 0.46%)~2.37s2.40sp=0.140 n=6
Check Time59.00s (± 0.22%)59.16s (± 0.32%)~58.91s59.44sp=0.128 n=6
Emit Time0.17s (± 3.32%)0.16s (± 3.16%)~0.16s0.17sp=0.640 n=6
Total Time68.18s (± 0.24%)68.34s (± 0.28%)~68.09s68.59sp=0.199 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,397,480k (± 0.04%)2,398,319k (± 0.04%)~2,396,829k2,399,594kp=0.230 n=6
Parse Time5.05s (± 0.38%)5.06s (± 0.72%)~5.00s5.10sp=0.628 n=6
Bind Time1.91s (± 0.69%)1.90s (± 0.98%)~1.88s1.92sp=0.418 n=6
Check Time33.75s (± 0.35%)33.88s (± 0.32%)~33.67s33.98sp=0.078 n=6
Emit Time2.68s (± 0.62%)2.67s (± 1.71%)~2.61s2.73sp=0.574 n=6
Total Time43.40s (± 0.25%)43.53s (± 0.28%)+0.13s (+ 0.30%)43.34s43.71sp=0.045 n=6
self-compiler - node (v18.15.0, x64)
Memory used415,428k (± 0.01%)415,446k (± 0.01%)~415,400k415,487kp=0.521 n=6
Parse Time2.80s (± 1.40%)2.78s (± 0.54%)~2.77s2.81sp=0.289 n=6
Bind Time1.06s (± 0.49%)1.07s (± 0.38%)+0.01s (+ 0.78%)1.07s1.08sp=0.022 n=6
Check Time15.26s (± 0.26%)15.22s (± 0.18%)-0.04s (- 0.29%)15.17s15.24sp=0.036 n=6
Emit Time1.09s (± 1.38%)1.10s (± 0.89%)~1.09s1.11sp=0.621 n=6
Total Time20.22s (± 0.35%)20.17s (± 0.19%)~20.11s20.21sp=0.199 n=6
vscode - node (v18.15.0, x64)
Memory used2,880,512k (± 0.00%)2,880,569k (± 0.00%)~2,880,547k2,880,600kp=0.109 n=6
Parse Time10.81s (± 0.26%)10.81s (± 0.29%)~10.75s10.83sp=0.746 n=6
Bind Time3.47s (± 0.34%)3.47s (± 0.22%)~3.46s3.48sp=0.396 n=6
Check Time61.70s (± 0.77%)61.64s (± 0.47%)~61.16s61.92sp=0.936 n=6
Emit Time17.60s (±10.10%)16.99s (± 8.14%)~16.31s19.81sp=0.230 n=6
Total Time93.57s (± 2.35%)92.91s (± 1.61%)~91.90s95.89sp=1.000 n=6
webpack - node (v18.15.0, x64)
Memory used406,564k (± 0.01%)406,586k (± 0.01%)~406,508k406,666kp=0.471 n=6
Parse Time3.19s (± 1.28%)3.20s (± 0.73%)~3.17s3.23sp=0.746 n=6
Bind Time1.38s (± 0.60%)1.38s (± 1.48%)~1.36s1.42sp=0.280 n=6
Check Time14.26s (± 0.30%)14.27s (± 0.34%)~14.22s14.34sp=1.000 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time18.84s (± 0.23%)18.85s (± 0.39%)~18.76s18.95sp=1.000 n=6
xstate - node (v18.15.0, x64)
Memory used513,267k (± 0.01%)513,238k (± 0.01%)~513,166k513,278kp=0.575 n=6
Parse Time3.28s (± 0.25%)3.28s (± 0.36%)~3.26s3.29sp=0.738 n=6
Bind Time1.54s (± 0.49%)1.54s (± 0.41%)~1.53s1.55sp=0.718 n=6
Check Time2.86s (± 0.76%)2.86s (± 0.95%)~2.82s2.90sp=1.000 n=6
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)~0.07s0.07sp=1.000 n=6
Total Time7.75s (± 0.43%)7.75s (± 0.44%)~7.70s7.80sp=0.936 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-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 - updateOpen2,355ms (± 0.62%)2,346ms (± 0.75%)~2,325ms2,370msp=0.470 n=6
Req 2 - geterr5,683ms (± 1.53%)5,745ms (± 1.79%)~5,601ms5,824msp=0.378 n=6
Req 3 - references321ms (± 0.76%)343ms (± 8.47%)🔻+22ms (+ 6.70%)323ms380msp=0.035 n=6
Req 4 - navto276ms (± 0.42%)270ms (± 2.24%)-6ms (- 2.11%)258ms273msp=0.004 n=6
Req 5 - completionInfo count1,357 (± 0.00%)1,357 (± 0.00%)~1,3571,357p=1.000 n=6
Req 5 - completionInfo83ms (± 3.03%)91ms (± 6.40%)~83ms95msp=0.071 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,517ms (± 0.55%)2,489ms (± 0.73%)-28ms (- 1.11%)2,470ms2,520msp=0.013 n=6
Req 2 - geterr4,218ms (± 2.06%)4,146ms (± 0.27%)~4,130ms4,157msp=0.378 n=6
Req 3 - references332ms (± 0.68%)339ms (± 0.91%)+7ms (+ 2.11%)335ms342msp=0.006 n=6
Req 4 - navto285ms (± 0.52%)290ms (± 2.40%)~284ms303msp=0.141 n=6
Req 5 - completionInfo count1,519 (± 0.00%)1,519 (± 0.00%)~1,5191,519p=1.000 n=6
Req 5 - completionInfo81ms (± 7.27%)86ms (± 7.08%)~78ms90msp=0.176 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,614ms (± 0.20%)2,616ms (± 0.24%)~2,605ms2,623msp=0.520 n=6
Req 2 - geterr1,728ms (± 2.10%)1,767ms (± 0.75%)~1,747ms1,786msp=0.065 n=6
Req 3 - references120ms (± 8.22%)119ms (± 8.38%)~105ms126msp=0.467 n=6
Req 4 - navto370ms (± 0.75%)367ms (± 0.42%)-3ms (- 0.86%)364ms368msp=0.043 n=6
Req 5 - completionInfo count2,079 (± 0.00%)2,079 (± 0.00%)~2,0792,079p=1.000 n=6
Req 5 - completionInfo306ms (± 1.69%)309ms (± 0.91%)~306ms314msp=0.422 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.21ms (± 0.17%)153.23ms (± 0.17%)~152.16ms156.10msp=0.992 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time229.56ms (± 0.16%)243.45ms (± 0.86%)🔻+13.89ms (+ 6.05%)241.54ms280.25msp=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time222.64ms (± 0.14%)222.89ms (± 0.16%)+0.25ms (+ 0.11%)221.42ms229.26msp=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time221.47ms (± 0.14%)221.47ms (± 0.15%)~220.11ms225.85msp=0.957 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
MemberAuthor

I can see from the benchmark that the last commit made tsserver 6% slower to start. I confirmed that locally too. Probably the extra copy of the server object that gets made.

I'm going to revert it and stick with the version that usests.server.* instead to prevent that slowdown, and come back to this later to see if I've missed a better way to write this.

fz6m reacted with eyes emoji

@jakebaileyjakebailey merged commitaeddd65 intomicrosoft:mainMar 15, 2024
@jakebaileyjakebailey deleted the thin-tsserver-wrapper branchMarch 15, 2024 20:25
@microsoftmicrosoft locked asresolvedand limited conversation to collaboratorsOct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@weswighamweswighamweswigham approved these changes

@DanielRosenwasserDanielRosenwasserAwaiting requested review from DanielRosenwasser

@RyanCavanaughRyanCavanaughAwaiting requested review from RyanCavanaugh

Assignees

@jakebaileyjakebailey

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jakebailey@typescript-bot@weswigham

[8]ページ先頭

©2009-2025 Movatter.jp