Skip to content

Skip parsing JSDoc when not needed - #52921

Merged
Jake Bailey (jakebailey) merged 45 commits into
microsoft:mainfrom
jakebailey:skip-jsdoc
Sep 13, 2023
Merged

Skip parsing JSDoc when not needed#52921
Jake Bailey (jakebailey) merged 45 commits into
microsoft:mainfrom
jakebailey:skip-jsdoc

Conversation

@jakebailey

@jakebaileyJake Bailey (jakebailey) commented Feb 22, 2023

Copy link
Copy Markdown
Member

This is #52466 plus more changes, since I think we want to try and get this in for 5.0 if possible.

Needs a test, which we can achieve thanks to the compilerOptions use here.

For #52959

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

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

@jakebailey

Copy link
Copy Markdown
MemberAuthor

This PR is still wrong, fixing but I have to run.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

Comment threadsrc/harness/fakesHosts.ts Outdated
@jakebailey

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based top-repos suite (tsserver) on this PR at 3af4435. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite on this PR at 3af4435. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based top-repos suite on this PR at 3af4435. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the tarball bundle task on this PR at 3af4435. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite (tsserver) on this PR at 3af4435. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/147249/artifacts?artifactName=tgz&fileId=77F313F5F22E76C89FEA5F5A963AEF8EB942DE8EF20F507A82129360DDE8992502&fileName=/typescript-5.0.0-insiders.20230222.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.0.0-pr-52921-12".;

Comment threadsrc/compiler/scanner.ts Outdated
@typescript-bot

Copy link
Copy Markdown
Contributor

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

Here they are:

Comparison Report - main..52921

Metricmain52921DeltaBestWorstp-value
Angular - node (v16.17.1, x64)
Memory used358,876k (± 0.00%)350,121k (± 0.01%)-8,755k (- 2.44%)350,091k350,151kp=0.005 n=6
Parse Time3.72s (± 0.53%)3.38s (± 0.85%)🟩-0.34s (- 9.09%)3.33s3.41sp=0.005 n=6
Bind Time1.19s (± 0.92%)1.17s (± 0.47%)-0.01s (- 1.26%)1.17s1.18sp=0.015 n=6
Check Time9.46s (± 0.33%)9.38s (± 0.24%)-0.07s (- 0.76%)9.36s9.41sp=0.008 n=6
Emit Time7.94s (± 0.97%)8.17s (± 0.59%)+0.23s (+ 2.85%)8.11s8.24sp=0.005 n=6
Total Time22.32s (± 0.43%)22.12s (± 0.38%)-0.20s (- 0.90%)21.99s22.20sp=0.006 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used191,955k (± 0.71%)189,912k (± 0.75%)-2,043k (- 1.06%)189,271k192,834kp=0.045 n=6
Parse Time1.57s (± 0.87%)1.45s (± 1.43%)🟩-0.13s (- 8.05%)1.41s1.47sp=0.005 n=6
Bind Time0.82s (± 0.50%)0.83s (± 0.62%)+0.01s (+ 1.02%)0.82s0.83sp=0.022 n=6
Check Time10.11s (± 0.27%)9.96s (± 0.80%)-0.15s (- 1.47%)9.91s10.12sp=0.029 n=6
Emit Time3.00s (± 1.01%)3.06s (± 1.32%)+0.06s (+ 1.83%)3.01s3.12sp=0.030 n=6
Total Time15.50s (± 0.34%)15.29s (± 0.54%)-0.21s (- 1.37%)15.20s15.44sp=0.008 n=6
Monaco - node (v16.17.1, x64)
Memory used343,080k (± 0.00%)341,785k (± 0.00%)-1,295k (- 0.38%)341,765k341,799kp=0.005 n=6
Parse Time2.80s (± 0.32%)2.73s (± 0.78%)-0.07s (- 2.56%)2.70s2.75sp=0.005 n=6
Bind Time1.08s (± 0.50%)1.09s (± 1.26%)~1.08s1.12sp=0.138 n=6
Check Time7.70s (± 0.42%)7.64s (± 0.51%)-0.07s (- 0.87%)7.60s7.70sp=0.030 n=6
Emit Time4.44s (± 0.63%)4.46s (± 1.13%)~4.43s4.56sp=0.570 n=6
Total Time16.02s (± 0.32%)15.92s (± 0.57%)~15.86s16.10sp=0.064 n=6
TFS - node (v16.17.1, x64)
Memory used299,214k (± 0.01%)299,300k (± 0.01%)+86k (+ 0.03%)299,284k299,323kp=0.005 n=6
Parse Time2.18s (± 0.69%)2.18s (± 0.37%)~2.17s2.19sp=0.498 n=6
Bind Time1.23s (± 1.22%)0.98s (± 0.64%)🟩-0.25s (-20.54%)0.97s0.99sp=0.004 n=6
Check Time7.18s (± 0.53%)7.48s (± 0.37%)+0.30s (+ 4.18%)7.45s7.51sp=0.005 n=6
Emit Time4.37s (± 0.77%)4.33s (± 0.78%)~4.28s4.37sp=0.124 n=6
Total Time14.96s (± 0.41%)14.97s (± 0.21%)~14.94s15.02sp=0.936 n=6
material-ui - node (v16.17.1, x64)
Memory used475,754k (± 0.01%)467,805k (± 0.01%)-7,949k (- 1.67%)467,751k467,847kp=0.005 n=6
Parse Time3.33s (± 0.41%)2.89s (± 0.72%)🟩-0.45s (-13.45%)2.86s2.91sp=0.005 n=6
Bind Time0.96s (± 0.42%)1.11s (± 0.88%)+0.15s (+15.60%)1.10s1.13sp=0.003 n=6
Check Time18.14s (± 0.83%)18.10s (± 1.01%)~17.92s18.44sp=0.521 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time22.44s (± 0.61%)22.10s (± 0.84%)-0.34s (- 1.53%)21.93s22.45sp=0.031 n=6
xstate - node (v16.17.1, x64)
Memory used545,746k (± 0.02%)518,091k (± 0.03%)🟩-27,655k (- 5.07%)517,983k518,345kp=0.005 n=6
Parse Time4.25s (± 0.33%)3.77s (± 0.34%)🟩-0.48s (-11.29%)3.75s3.78sp=0.005 n=6
Bind Time1.74s (± 0.43%)1.66s (± 0.45%)🟩-0.08s (- 4.78%)1.65s1.67sp=0.004 n=6
Check Time3.00s (± 0.54%)3.19s (± 0.26%)+0.20s (+ 6.62%)3.18s3.20sp=0.004 n=6
Emit Time0.09s (± 0.00%)0.09s (± 0.00%)~0.09s0.09sp=1.000 n=6
Total Time9.08s (± 0.31%)8.71s (± 0.20%)🟩-0.37s (- 4.02%)8.69s8.74sp=0.005 n=6
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
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
BenchmarkNameIterations
Current529216
Baselinemain6

Developer Information:

Download Benchmark

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing main and refs/pull/52921/merge:

Something interesting changed - please have a look.

Details

webpack

tsconfig.json

tsconfig.types.json

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user test suite comparing main and refs/pull/52921/merge:

Something interesting changed - please have a look.

Details

webpack

⚠️ Note that built had errors ⚠️
Req #2032 - completionEntryDetails
at Object.getImportCompletionAction (/typescript-main/built/local/tsserver.js:141638:11)
at getCompletionEntryCodeActionsAndSourceDisplay (/typescript-main/built/local/tsserver.js:149781:62)
at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:149666:46)
at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:135555:35)
at /typescript-main/built/local/tsserver.js:179168:43
at mapDefined (/typescript-main/built/local/tsserver.js:2627:22)
at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:179166:20)
at completionEntryDetails (/typescript-main/built/local/tsserver.js:177512:43)
at /typescript-main/built/local/tsserver.js:179856:69
at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:179848:14)
at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:179856:29)
at IOSession.onMessage (/typescript-main/built/local/tsserver.js:179898:51)
at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:181442:14)

🎉 New server no longer has errors 🎉

@jakebailey

Copy link
Copy Markdown
MemberAuthor

Um, hm. Those errors are interesting because they imply that I'm still doing something wrong here.

Comment threadsrc/compiler/watchPublic.ts Outdated
Comment threadsrc/compiler/parser.ts Outdated
@jakebailey

Jake Bailey (jakebailey) commented Sep 13, 2023

Copy link
Copy Markdown
MemberAuthor

fisker Cheung (@fisker)SUZUKI Sosuke (@sosukesuzuki) you might be interested in this one. I'm not sure if prettier or typescript-estree actually use the .jsdoc properties / JSDoc nodes, but if they don't, then this should result in a significant speedup on files that contain JSDoc so long as this new parser option is plumbed.

Actually, thinking about it, external users may not even need @see or @link; would it make sense to modify this API such that it's possible to say "I don't care about JSDoc at all" and just enable semantic JSDoc tags inside of tsc?

(It's kinda now or never, given the PR currently has a boolean which explicitly calls out semantic JSDoc tags.)

@jakebaileyJake Bailey (jakebailey) changed the title Skip parsing JSDoc in .ts filesSkip parsing JSDoc in .ts files when not needed by callerSep 13, 2023
@jakebailey

Copy link
Copy Markdown
MemberAuthor

In fact, one may not even need the tags at all even outside of TS files, e.g. formatting JS files...

@jakebaileyJake Bailey (jakebailey) changed the title Skip parsing JSDoc in .ts files when not needed by callerSkip parsing JSDoc when not neededSep 13, 2023
@jakebailey

Jake Bailey (jakebailey) commented Sep 13, 2023

Copy link
Copy Markdown
MemberAuthor

Actually to start, I'm just going to make this API internal as-is (because we want this in tsc now), and then send a follow-up change for comment to make this more configurable.

@jakebailey

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster
TypeScript Bot (@typescript-bot) perf test this bun

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

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

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v16.17.1, x64)
Memory used300,543k (± 0.01%)294,074k (± 0.01%)-6,469k (- 2.15%)294,052k294,101kp=0.005 n=6
Parse Time3.01s (± 0.18%)2.83s (± 0.14%)🟩-0.18s (- 5.88%)2.82s2.83sp=0.003 n=6
Bind Time0.93s (± 0.00%)0.92s (± 0.60%)-0.02s (- 1.61%)0.91s0.92sp=0.002 n=6
Check Time9.35s (± 0.21%)9.27s (± 0.38%)-0.09s (- 0.93%)9.21s9.30sp=0.005 n=6
Emit Time7.63s (± 0.30%)7.44s (± 0.29%)-0.19s (- 2.53%)7.41s7.47sp=0.005 n=6
Total Time20.92s (± 0.18%)20.44s (± 0.22%)-0.48s (- 2.29%)20.38s20.50sp=0.005 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used194,625k (± 0.53%)192,285k (± 0.02%)-2,341k (- 1.20%)192,231k192,315kp=0.005 n=6
Parse Time1.58s (± 0.00%)1.46s (± 0.00%)🟩-0.12s (- 7.59%)1.46s1.46sp=0.001 n=6
Bind Time0.79s (± 0.65%)0.79s (± 0.00%)~0.79s0.79sp=0.174 n=6
Check Time9.95s (± 0.35%)9.88s (± 0.39%)-0.07s (- 0.70%)9.80s9.90sp=0.007 n=6
Emit Time2.74s (± 0.19%)2.75s (± 0.37%)+0.02s (+ 0.61%)2.74s2.77sp=0.009 n=6
Total Time15.06s (± 0.22%)14.89s (± 0.33%)-0.17s (- 1.16%)14.79s14.92sp=0.005 n=6
Monaco - node (v16.17.1, x64)
Memory used347,291k (± 0.01%)346,369k (± 0.00%)-922k (- 0.27%)346,353k346,375kp=0.005 n=6
Parse Time2.69s (± 0.15%)2.64s (± 0.39%)-0.04s (- 1.67%)2.63s2.66sp=0.003 n=6
Bind Time0.99s (± 0.00%)0.99s (± 0.00%)~0.99s0.99sp=1.000 n=6
Check Time7.96s (± 0.23%)7.89s (± 0.28%)-0.08s (- 0.96%)7.86s7.92sp=0.005 n=6
Emit Time4.25s (± 0.25%)4.27s (± 0.28%)~4.25s4.28sp=0.138 n=6
Total Time15.90s (± 0.17%)15.79s (± 0.19%)-0.11s (- 0.66%)15.74s15.82sp=0.005 n=6
TFS - node (v16.17.1, x64)
Memory used301,404k (± 0.01%)301,621k (± 0.00%)+217k (+ 0.07%)301,614k301,626kp=0.005 n=6
Parse Time2.17s (± 0.82%)2.16s (± 1.12%)~2.13s2.20sp=0.220 n=6
Bind Time1.12s (± 1.35%)0.90s (± 0.57%)🟩-0.21s (-19.10%)0.90s0.91sp=0.004 n=6
Check Time7.23s (± 0.33%)7.45s (± 0.28%)+0.22s (+ 3.09%)7.43s7.48sp=0.005 n=6
Emit Time3.98s (± 0.26%)3.96s (± 0.14%)-0.02s (- 0.46%)3.96s3.97sp=0.008 n=6
Total Time14.50s (± 0.27%)14.47s (± 0.15%)~14.45s14.50sp=0.294 n=6
material-ui - node (v16.17.1, x64)
Memory used479,884k (± 0.00%)469,676k (± 0.01%)-10,208k (- 2.13%)469,560k469,737kp=0.005 n=6
Parse Time3.15s (± 0.20%)2.76s (± 0.15%)🟩-0.39s (-12.33%)2.76s2.77sp=0.003 n=6
Bind Time0.91s (± 0.00%)1.05s (± 0.49%)+0.14s (+15.75%)1.05s1.06sp=0.002 n=6
Check Time17.85s (± 0.35%)17.80s (± 0.25%)~17.76s17.87sp=0.128 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time21.90s (± 0.27%)21.61s (± 0.24%)-0.29s (- 1.32%)21.57s21.70sp=0.005 n=6
xstate - node (v16.17.1, x64)
Memory used542,865k (± 0.01%)509,327k (± 0.02%)🟩-33,538k (- 6.18%)509,239k509,478kp=0.005 n=6
Parse Time3.69s (± 0.23%)3.39s (± 0.15%)🟩-0.29s (- 7.91%)3.39s3.40sp=0.004 n=6
Bind Time1.46s (± 0.28%)1.64s (± 0.00%)+0.18s (+12.20%)1.64s1.64sp=0.002 n=6
Check Time3.17s (± 0.37%)3.14s (± 0.52%)-0.02s (- 0.74%)3.13s3.17sp=0.035 n=6
Emit Time0.08s (± 6.19%)0.08s (± 0.00%)~0.08s0.08sp=0.174 n=6
Total Time8.39s (± 0.14%)8.27s (± 0.20%)-0.12s (- 1.47%)8.25s8.29sp=0.005 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

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

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - bun (v1.0.0, x64)
Memory used321,868k (± 0.11%)316,799k (± 0.17%)-5,069k (- 1.57%)315,340k318,366kp=0.000 n=12
Parse Time2.34s (± 0.52%)2.30s (± 0.39%)-0.03s (- 1.39%)2.28s2.33sp=0.000 n=12
Bind Time0.91s (± 1.59%)0.90s (± 2.18%)~0.83s0.95sp=0.747 n=12
Check Time8.09s (± 0.50%)7.96s (± 0.34%)-0.13s (- 1.62%)7.89s8.04sp=0.000 n=12
Emit Time6.42s (± 0.52%)6.40s (± 0.28%)~6.36s6.47sp=0.295 n=12
Total Time17.76s (± 0.28%)17.57s (± 0.26%)-0.19s (- 1.08%)17.49s17.73sp=0.000 n=12
Compiler-Unions - bun (v1.0.0, x64)
Memory used255,023k (± 0.31%)245,488k (± 1.01%)🟩-9,535k (- 3.74%)236,221k248,298kp=0.000 n=12
Parse Time1.25s (± 0.40%)1.13s (± 1.31%)🟩-0.13s (-10.16%)1.11s1.19sp=0.000 n=12
Bind Time0.84s (± 1.17%)0.83s (± 0.96%)~0.81s0.85sp=0.082 n=12
Check Time8.92s (± 0.44%)8.79s (± 0.33%)-0.13s (- 1.46%)8.72s8.89sp=0.000 n=12
Emit Time2.81s (± 0.55%)2.79s (± 0.79%)~2.75s2.87sp=0.307 n=12
Total Time13.82s (± 0.31%)13.55s (± 0.29%)-0.27s (- 1.99%)13.46s13.63sp=0.000 n=12
Monaco - bun (v1.0.0, x64)
Memory used369,676k (± 0.09%)378,830k (± 0.18%)+9,153k (+ 2.48%)376,910k379,942kp=0.000 n=12
Parse Time2.04s (± 0.20%)1.98s (± 0.77%)🟩-0.06s (- 3.14%)1.95s2.02sp=0.000 n=12
Bind Time1.10s (± 0.98%)0.96s (± 2.05%)🟩-0.14s (-12.50%)0.90s1.01sp=0.000 n=12
Check Time7.20s (± 0.25%)7.39s (± 0.32%)+0.19s (+ 2.66%)7.31s7.43sp=0.000 n=12
Emit Time3.73s (± 0.50%)3.73s (± 0.49%)~3.69s3.78sp=0.953 n=12
Total Time14.07s (± 0.20%)14.06s (± 0.22%)~13.97s14.13sp=0.562 n=12
TFS - bun (v1.0.0, x64)
Memory used317,716k (± 0.19%)317,316k (± 0.18%)~315,395k318,424kp=0.470 n=12
Parse Time1.79s (± 0.45%)1.76s (± 0.85%)-0.03s (- 1.63%)1.73s1.81sp=0.004 n=12
Bind Time0.99s (± 2.03%)1.00s (± 1.15%)~0.98s1.03sp=0.229 n=12
Check Time6.62s (± 0.37%)6.60s (± 0.27%)~6.55s6.65sp=0.338 n=12
Emit Time3.45s (± 0.52%)3.46s (± 0.67%)~3.41s3.54sp=0.384 n=12
Total Time12.85s (± 0.30%)12.83s (± 0.26%)~12.75s12.91sp=0.524 n=12
material-ui - bun (v1.0.0, x64)
Memory used531,912k (± 0.36%)492,259k (± 2.05%)🟩-39,653k (- 7.45%)475,278k511,028kp=0.000 n=12
Parse Time2.49s (± 0.44%)2.24s (± 0.24%)🟩-0.25s (-10.17%)2.23s2.25sp=0.000 n=12
Bind Time0.71s (± 0.59%)0.74s (± 3.20%)~0.69s0.79sp=0.402 n=12
Check Time15.86s (± 0.35%)15.76s (± 0.38%)-0.10s (- 0.63%)15.57s15.89sp=0.026 n=12
Emit Time0.00s (±217.90%)0.00s (± 0.00%)~0.00s0.00sp=0.359 n=12
Total Time19.07s (± 0.30%)18.75s (± 0.29%)-0.33s (- 1.72%)18.58s18.90sp=0.000 n=12
xstate - bun (v1.0.0, x64)
Memory used489,211k (± 4.78%)410,056k (± 5.97%)🟩-79,155k (-16.18%)380,851k464,238kp=0.001 n=12
Parse Time3.61s (± 0.47%)3.25s (± 0.26%)🟩-0.36s (-10.08%)3.24s3.28sp=0.000 n=12
Bind Time1.39s (± 0.81%)1.26s (± 0.86%)🟩-0.13s (- 9.24%)1.22s1.28sp=0.000 n=12
Check Time3.57s (± 0.54%)3.59s (± 0.20%)~3.57s3.61sp=0.066 n=12
Emit Time0.22s (± 5.59%)0.21s (± 2.29%)🟩-0.01s (- 5.68%)0.20s0.22sp=0.044 n=12
Total Time8.79s (± 0.22%)8.32s (± 0.23%)🟩-0.48s (- 5.43%)8.26s8.37sp=0.000 n=12
System info unknown
Hosts
  • bun (v1.0.0, x64)
Scenarios
  • Angular - bun (v1.0.0, x64)
  • Compiler-Unions - bun (v1.0.0, x64)
  • Monaco - bun (v1.0.0, x64)
  • TFS - bun (v1.0.0, x64)
  • material-ui - bun (v1.0.0, x64)
  • xstate - bun (v1.0.0, x64)
BenchmarkNameIterations
Currentpr12
Baselinebaseline12

Startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - bun (v1.0.0, x64)
Execution time428.94ms (± 0.09%)428.70ms (± 0.08%)-0.24ms (- 0.06%)427.55ms436.45msp=0.000 n=600
tsserverlibrary-startup - bun (v1.0.0, x64)
Execution time666.67ms (± 0.14%)665.13ms (± 0.15%)-1.54ms (- 0.23%)663.29ms683.23msp=0.000 n=600
typescript-startup - bun (v1.0.0, x64)
Execution time667.75ms (± 0.13%)665.86ms (± 0.12%)-1.88ms (- 0.28%)664.00ms679.75msp=0.000 n=600
System info unknown
Hosts
  • bun (v1.0.0, x64)
Scenarios
  • tsc-startup - bun (v1.0.0, x64)
  • tsserverlibrary-startup - bun (v1.0.0, x64)
  • typescript-startup - bun (v1.0.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@jakebailey

Copy link
Copy Markdown
MemberAuthor

Follow-up is #55739.

@bradzacher

Copy link
Copy Markdown
Contributor

would it make sense to modify this API such that it's possible to say "I don't care about JSDoc at all"

Yes. TS-ESTree does not use the JSDoc property at all - we do absolutely no touching of JSDoc. We do touch the comment contents so we can transform the AST node, but that is just via the source code text.

I don't believe any part of our ecosystem touches JSDoc - as we've seen even the JSDoc plugin doesn't as it uses its own separate JSDoc parser.

We'd see pretty decent wins across the ecosystem by being able to completely skip the JSDoc parsing!

@jakebailey

Copy link
Copy Markdown
MemberAuthor

I think my main concern is that people will want to read out the .jsDoc properties by asking typescript-eslint for the original AST nodes (e.g. #55139), and then find that the info was never populated, or similar. I also wanted to try and make .jsDoc lazy and only create it when accessed (since we have the text anyway), but since JSDoc is bound by the binder, you can't really do that.

But #55739 is probably a better place to keep talking about the bulk hammer of letting people disable it.

@fisker

Copy link
Copy Markdown

I'm not sure if prettier or typescript-estree actually use the .jsdoc properties / JSDoc nodes

Prettier uses the AST provied by @typescript-eslint/parser, since bradzacher already answered that TS-ESTree does not use the JSDoc property at all, so Prettier doesn't need it either.

Marcus Ording (snovader) pushed a commit to EG-A-S/TypeScript that referenced this pull request Sep 23, 2023
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 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.

9 participants

@jakebailey@typescript-bot@Andarist@sandersn@sheetalkamat@DanielRosenwasser@bradzacher@fisker@andrewbranch