Skip to content

@link support, second try #43312

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

Merged
merged 5 commits into from
Mar 22, 2021
Merged

@link support, second try #43312

merged 5 commits into from
Mar 22, 2021

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Mar 19, 2021

Same as #41877, but with an additional commit to fix parsing unterminated @link tags that go to the end of a comment.

Note that local runs of activex-libreoffice show memory usage 100 MB -> 118 MB and 226k -> 290k nodes, an 18% increase in memory and 28% increase in node count. That's quite a bit, although activex-libreoffice uses jsdoc and @link heavily.

I'm going to make sure that DT succeeds with this build and also look at memory use from the perf tests.

@typescript-bot
Copy link
Collaborator

Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Mar 19, 2021
@sandersn sandersn changed the title Fix link parsing comment end @link support, second try Mar 19, 2021
@sandersn
Copy link
Member Author

@typescript-bot run dt
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 19, 2021

Heya @sandersn, I've started to run the perf test suite on this PR at 053b7dc. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 19, 2021

Heya @sandersn, I've started to run the parallelized Definitely Typed test suite on this PR at 053b7dc. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

@sandersn
The results of the perf run you requested are in!

Here they are:

Comparison Report - master..43312

Metric master 43312 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 348,590k (± 0.02%) 353,267k (± 0.01%) +4,677k (+ 1.34%) 353,188k 353,431k
Parse Time 1.92s (± 0.66%) 1.97s (± 0.59%) +0.05s (+ 2.50%) 1.95s 2.00s
Bind Time 0.83s (± 0.78%) 0.84s (± 0.59%) +0.01s (+ 1.56%) 0.84s 0.86s
Check Time 5.06s (± 0.31%) 5.07s (± 0.48%) +0.00s (+ 0.10%) 5.01s 5.14s
Emit Time 5.92s (± 0.51%) 5.98s (± 0.70%) +0.06s (+ 0.95%) 5.85s 6.08s
Total Time 13.73s (± 0.30%) 13.85s (± 0.37%) +0.12s (+ 0.87%) 13.73s 13.97s
Compiler-Unions - node (v10.16.3, x64)
Memory used 204,760k (± 0.13%) 206,196k (± 0.03%) +1,435k (+ 0.70%) 206,086k 206,376k
Parse Time 0.78s (± 0.75%) 0.79s (± 0.89%) +0.01s (+ 1.80%) 0.78s 0.81s
Bind Time 0.52s (± 1.11%) 0.53s (± 1.89%) +0.01s (+ 2.29%) 0.51s 0.55s
Check Time 7.42s (± 0.37%) 7.52s (± 0.48%) +0.10s (+ 1.35%) 7.44s 7.58s
Emit Time 2.55s (± 0.72%) 2.59s (± 0.82%) +0.04s (+ 1.37%) 2.54s 2.63s
Total Time 11.28s (± 0.31%) 11.43s (± 0.40%) +0.16s (+ 1.39%) 11.30s 11.50s
Monaco - node (v10.16.3, x64)
Memory used 356,674k (± 0.03%) 357,730k (± 0.02%) +1,055k (+ 0.30%) 357,623k 357,874k
Parse Time 1.56s (± 0.39%) 1.57s (± 0.86%) +0.01s (+ 0.90%) 1.53s 1.59s
Bind Time 0.74s (± 0.92%) 0.75s (± 1.02%) +0.01s (+ 1.36%) 0.73s 0.77s
Check Time 5.22s (± 0.59%) 5.24s (± 0.44%) +0.02s (+ 0.44%) 5.19s 5.29s
Emit Time 3.10s (± 0.63%) 3.15s (± 1.27%) +0.05s (+ 1.61%) 3.06s 3.26s
Total Time 10.62s (± 0.40%) 10.71s (± 0.59%) +0.10s (+ 0.89%) 10.56s 10.85s
TFS - node (v10.16.3, x64)
Memory used 309,009k (± 0.02%) 309,603k (± 0.01%) +594k (+ 0.19%) 309,548k 309,735k
Parse Time 1.21s (± 0.55%) 1.22s (± 0.57%) +0.01s (+ 0.74%) 1.21s 1.24s
Bind Time 0.69s (± 0.86%) 0.70s (± 0.82%) +0.01s (+ 0.86%) 0.69s 0.71s
Check Time 4.65s (± 0.65%) 4.69s (± 0.49%) +0.04s (+ 0.84%) 4.65s 4.75s
Emit Time 3.26s (± 1.31%) 3.25s (± 0.82%) -0.01s (- 0.21%) 3.20s 3.32s
Total Time 9.82s (± 0.53%) 9.86s (± 0.38%) +0.04s (+ 0.45%) 9.78s 9.94s
material-ui - node (v10.16.3, x64)
Memory used 502,355k (± 0.01%) 508,911k (± 0.01%) +6,556k (+ 1.31%) 508,816k 509,034k
Parse Time 1.99s (± 0.58%) 2.04s (± 0.29%) +0.04s (+ 2.16%) 2.02s 2.05s
Bind Time 0.65s (± 1.60%) 0.66s (± 0.84%) +0.01s (+ 1.54%) 0.65s 0.67s
Check Time 14.29s (± 0.59%) 14.43s (± 0.65%) +0.14s (+ 0.95%) 14.19s 14.56s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.94s (± 0.52%) 17.13s (± 0.54%) +0.19s (+ 1.12%) 16.89s 17.26s
Angular - node (v12.1.0, x64)
Memory used 326,283k (± 0.02%) 329,506k (± 0.08%) +3,223k (+ 0.99%) 328,460k 329,840k
Parse Time 1.90s (± 0.55%) 1.94s (± 0.62%) +0.04s (+ 2.37%) 1.91s 1.97s
Bind Time 0.81s (± 0.71%) 0.83s (± 0.41%) +0.01s (+ 1.72%) 0.82s 0.83s
Check Time 4.95s (± 0.40%) 5.03s (± 0.85%) +0.08s (+ 1.58%) 4.93s 5.16s
Emit Time 6.00s (± 0.90%) 6.01s (± 0.86%) +0.01s (+ 0.13%) 5.93s 6.15s
Total Time 13.65s (± 0.53%) 13.80s (± 0.63%) +0.14s (+ 1.05%) 13.59s 14.03s
Compiler-Unions - node (v12.1.0, x64)
Memory used 191,397k (± 0.13%) 192,331k (± 0.07%) +934k (+ 0.49%) 191,871k 192,515k
Parse Time 0.77s (± 0.43%) 0.78s (± 0.76%) +0.01s (+ 1.82%) 0.77s 0.80s
Bind Time 0.52s (± 0.77%) 0.53s (± 0.63%) +0.01s (+ 1.73%) 0.52s 0.54s
Check Time 6.94s (± 0.78%) 7.07s (± 0.34%) +0.13s (+ 1.81%) 7.03s 7.14s
Emit Time 2.58s (± 1.11%) 2.57s (± 1.05%) -0.01s (- 0.46%) 2.50s 2.65s
Total Time 10.82s (± 0.68%) 10.96s (± 0.25%) +0.14s (+ 1.29%) 10.90s 11.00s
Monaco - node (v12.1.0, x64)
Memory used 339,086k (± 0.01%) 339,808k (± 0.02%) +722k (+ 0.21%) 339,628k 339,981k
Parse Time 1.53s (± 0.65%) 1.55s (± 0.74%) +0.02s (+ 1.18%) 1.53s 1.57s
Bind Time 0.72s (± 0.51%) 0.72s (± 0.68%) -0.00s (- 0.14%) 0.71s 0.73s
Check Time 5.08s (± 0.53%) 5.05s (± 0.41%) -0.02s (- 0.47%) 4.99s 5.09s
Emit Time 3.14s (± 0.82%) 3.13s (± 0.46%) -0.01s (- 0.29%) 3.10s 3.16s
Total Time 10.47s (± 0.43%) 10.46s (± 0.33%) -0.01s (- 0.11%) 10.33s 10.51s
TFS - node (v12.1.0, x64)
Memory used 293,146k (± 0.02%) 293,606k (± 0.02%) +460k (+ 0.16%) 293,440k 293,721k
Parse Time 1.20s (± 0.57%) 1.23s (± 0.83%) +0.02s (+ 1.99%) 1.21s 1.25s
Bind Time 0.68s (± 0.54%) 0.69s (± 0.68%) +0.01s (+ 0.73%) 0.68s 0.70s
Check Time 4.60s (± 0.48%) 4.62s (± 0.47%) +0.02s (+ 0.52%) 4.58s 4.67s
Emit Time 3.14s (± 0.88%) 3.17s (± 1.01%) +0.02s (+ 0.73%) 3.07s 3.22s
Total Time 9.63s (± 0.39%) 9.71s (± 0.47%) +0.08s (+ 0.81%) 9.56s 9.79s
material-ui - node (v12.1.0, x64)
Memory used 480,305k (± 0.03%) 484,851k (± 0.01%) +4,546k (+ 0.95%) 484,762k 484,927k
Parse Time 1.99s (± 0.39%) 2.05s (± 0.74%) +0.06s (+ 3.06%) 2.02s 2.09s
Bind Time 0.64s (± 0.70%) 0.66s (± 0.84%) +0.02s (+ 3.13%) 0.64s 0.67s
Check Time 12.94s (± 0.95%) 12.95s (± 0.68%) +0.01s (+ 0.06%) 12.78s 13.14s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.57s (± 0.79%) 15.66s (± 0.63%) +0.08s (+ 0.55%) 15.44s 15.86s
Angular - node (v14.15.1, x64)
Memory used 324,839k (± 0.07%) 328,276k (± 0.01%) +3,437k (+ 1.06%) 328,215k 328,329k
Parse Time 1.91s (± 0.68%) 1.95s (± 0.88%) +0.04s (+ 2.10%) 1.92s 1.99s
Bind Time 0.84s (± 0.81%) 0.87s (± 0.64%) +0.03s (+ 3.32%) 0.86s 0.89s
Check Time 4.98s (± 0.88%) 4.94s (± 0.32%) -0.04s (- 0.80%) 4.91s 4.98s
Emit Time 6.30s (± 0.70%) 6.30s (± 0.58%) -0.00s (- 0.02%) 6.24s 6.39s
Total Time 14.03s (± 0.62%) 14.06s (± 0.36%) +0.03s (+ 0.22%) 13.95s 14.21s
Compiler-Unions - node (v14.15.1, x64)
Memory used 191,094k (± 0.01%) 192,012k (± 0.01%) +918k (+ 0.48%) 191,953k 192,082k
Parse Time 0.79s (± 0.75%) 0.81s (± 0.64%) +0.02s (+ 2.14%) 0.80s 0.82s
Bind Time 0.55s (± 0.54%) 0.56s (± 0.61%) +0.01s (+ 0.91%) 0.55s 0.56s
Check Time 6.99s (± 0.49%) 7.08s (± 0.64%) +0.10s (+ 1.37%) 7.01s 7.18s
Emit Time 2.55s (± 0.58%) 2.55s (± 0.36%) -0.00s (- 0.12%) 2.53s 2.57s
Total Time 10.88s (± 0.31%) 11.00s (± 0.45%) +0.12s (+ 1.07%) 10.91s 11.11s
Monaco - node (v14.15.1, x64)
Memory used 338,064k (± 0.00%) 338,833k (± 0.00%) +769k (+ 0.23%) 338,790k 338,865k
Parse Time 1.56s (± 0.65%) 1.57s (± 0.65%) +0.01s (+ 0.84%) 1.54s 1.58s
Bind Time 0.74s (± 0.40%) 0.75s (± 1.08%) +0.01s (+ 1.48%) 0.74s 0.78s
Check Time 4.97s (± 0.42%) 4.97s (± 0.43%) -0.00s (- 0.08%) 4.91s 5.01s
Emit Time 3.16s (± 0.28%) 3.17s (± 0.86%) +0.01s (+ 0.38%) 3.13s 3.24s
Total Time 10.43s (± 0.24%) 10.46s (± 0.43%) +0.03s (+ 0.28%) 10.36s 10.56s
TFS - node (v14.15.1, x64)
Memory used 292,287k (± 0.01%) 292,735k (± 0.01%) +448k (+ 0.15%) 292,707k 292,774k
Parse Time 1.25s (± 0.97%) 1.27s (± 1.65%) +0.03s (+ 2.41%) 1.24s 1.35s
Bind Time 0.72s (± 0.81%) 0.72s (± 0.66%) 0.00s ( 0.00%) 0.71s 0.73s
Check Time 4.59s (± 0.47%) 4.60s (± 0.43%) +0.01s (+ 0.28%) 4.56s 4.66s
Emit Time 3.24s (± 0.52%) 3.25s (± 0.66%) +0.01s (+ 0.22%) 3.21s 3.31s
Total Time 9.79s (± 0.27%) 9.84s (± 0.38%) +0.05s (+ 0.48%) 9.79s 9.97s
material-ui - node (v14.15.1, x64)
Memory used 478,560k (± 0.05%) 483,126k (± 0.05%) +4,566k (+ 0.95%) 482,124k 483,281k
Parse Time 2.06s (± 0.63%) 2.09s (± 0.66%) +0.04s (+ 1.85%) 2.06s 2.13s
Bind Time 0.69s (± 0.64%) 0.71s (± 0.94%) +0.02s (+ 2.60%) 0.70s 0.73s
Check Time 13.00s (± 0.67%) 13.07s (± 0.69%) +0.08s (+ 0.58%) 12.93s 13.32s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.75s (± 0.53%) 15.88s (± 0.62%) +0.13s (+ 0.82%) 15.71s 16.14s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-198-generic
Architecturex64
Available Memory16 GB
Available Memory4 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
Benchmark Name Iterations
Current 43312 10
Baseline master 10

Developer Information:

Download Benchmark

@sandersn
Copy link
Member Author

Here are the results for node 14 (the node 12 results are basically identical and I didn't look at node 10):

  • Angular 1.06%
  • Compiler - Unions 0.48%
  • Monaco 0.23%
  • TFS 0.15%
  • material-ui 0.95%

Memory usage is stable across runs, so these results are highly statistically significant.
I don't know whether --diagnostics uses a different method to report memory usage than the perf tests.

@sandersn sandersn requested review from amcasey and andrewbranch and removed request for andrewbranch March 19, 2021 18:16
@sandersn
Copy link
Member Author

After looking closer at the results and doing some local testing, it looks like 1000 jsdoc = 1 MB of memory increase. I think that's fine. The number is alarming for activex-libreoffice because it has so much jsdoc and because checking is so easy. I recommend taking this change.

@amcasey
Copy link
Member

amcasey commented Mar 20, 2021

@sandersn It sounds like you're saying that each jsdoc comment uses 1KB more memory than its string representation - is that right? That seems kind of high, doesn't it? How many objects is each comment turning into?

@sandersn
Copy link
Member Author

sandersn commented Mar 22, 2021

The common case of a jsdoc comment with no links should create an additional NodeArray (an array instance-patched with 2 properties and optionally (rarely) 2 more) that contains a single JSDocText (a Node instance, which has 9 properties and optionally 12 more), which contains the string that was originally there.

I did a quick experiment, which turned into a lot of measurement, to find the likelihood of bugs here. I compared master with this branch, as well as a branch that doesn't change the parser except to add a singleton NodeArray containing a JSDocText. It's at jsdoc-simple-parse-EXPERIMENT -- it's an obvious subset of this PR. It does not parse @link tags.

Edit: After discussing ideas with @amcasey, I made the AST comment type: string | NodeArray<JSDocText | JSDocLink>. The common case still creates a string, and then walking the tree conditionally skips comments when it's just a string. I measured performance with this commit too.

Memory usage is an average of 7 runs.

activex-libreoffice

16,000 jsdocs and 6,000 @link:

master: 226k nodes, 114.4 MB (with a surprising amount of variance, much more than the +-500k I'm used to seeing)
jsdoc-simple-parse experiment: 254k nodes, 107 MB
fix-link-parsing-comment-end: 290k nodes, 116.5
string | NodeArray: 266k nodes, 121 MB

angular 2

3,000 jsdocs and 500 @link:

master: 934k nodes, 445 MB
jsdoc-simple-parse-experiment: 944k nodes, 447.5 MB
fix-link-parsing-comment-end: 946k nodes, 448 MB
string | NodeArray: 936k nodes, 445.7 MB

compiler-unions

1,000 jsdocs, 1 @link:
master: 412k nodes, 349 MB
jsdoc-simple-parse-experiment: 415k nodes, 346.4 MB
fix-link-parsing-comment-end: 415k nodes, 346.7 MB
string | NodeArray: 412k nodes, 346 MB

There is quite a bit of variance in memory usage for compiler-unions. Maybe I'm seeing the effect of the new union cache?

@amcasey
Copy link
Member

amcasey commented Mar 22, 2021

I might be blanking, but why do we do any of this work in tsc scenarios? Isn't @link purely for editor support?

@sandersn
Copy link
Member Author

The way it's implemented now gives jsdoc texts a full AST parse. That form makes it much easier to produce displayparts for the editor.

@amcasey
Copy link
Member

amcasey commented Mar 22, 2021

Right, but couldn't we skip that extra parsing in tsc scenarios?

const comments: string[] = [];
let linkEnd: number;
let commentsPos: number | undefined;
let comments: string[] = [];
Copy link
Member

Choose a reason for hiding this comment

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

Not new, but why is comments accumulated as an array of parts and joined later, rather than simply accumulated as a string?

Copy link
Member Author

Choose a reason for hiding this comment

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

Habit from immutable-string languages without optimisations for +=. I'm not sure if JS is still one of these languages or not.

Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure I remember reading that += is the fastest way to accumulate a string in JS, but I don't have a source.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to try this in a separate PR.

@@ -3133,13 +3135,24 @@ namespace ts {
readonly kind: SyntaxKind.JSDocComment;
readonly parent: HasJSDoc;
readonly tags?: NodeArray<JSDocTag>;
readonly comment?: string;
readonly comment?: NodeArray<JSDocText | JSDocLink>;
Copy link
Member

Choose a reason for hiding this comment

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

If we decided we were sufficiently bothered by the increased memory usage, could this be string | NodeArray? Alternatively, could we have JSDoc and JSDocWithLinks?

Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

We talked offline about some ways we might be able to reduce memory usage in common cases and I think it would be good to experiment with them. Otherwise, LGTM

@sandersn
Copy link
Member Author

The common case experiment worked out pretty well, except for activex-libreoffice, which has really weird characteristics already. I'm going to fix a bug in services that I introduced, push the commit, and run perf tests on it to make sure that it doesn't slow things down a lot.

@sandersn
Copy link
Member Author

@typescript-bot perf test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 22, 2021

Heya @sandersn, I've started to run the parallelized Definitely Typed test suite on this PR at 4db5d97. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 22, 2021

Heya @sandersn, I've started to run the perf test suite on this PR at 4db5d97. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@sandersn
The results of the perf run you requested are in!

Here they are:

Comparison Report - master..43312

Metric master 43312 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 344,074k (± 0.02%) 344,480k (± 0.01%) +406k (+ 0.12%) 344,402k 344,580k
Parse Time 1.93s (± 0.60%) 1.93s (± 0.49%) +0.00s (+ 0.10%) 1.91s 1.95s
Bind Time 0.83s (± 0.67%) 0.83s (± 0.36%) -0.00s (- 0.48%) 0.82s 0.83s
Check Time 5.11s (± 0.34%) 5.08s (± 0.41%) -0.03s (- 0.53%) 5.04s 5.12s
Emit Time 5.93s (± 0.83%) 5.87s (± 0.47%) -0.06s (- 0.98%) 5.83s 5.94s
Total Time 13.80s (± 0.48%) 13.71s (± 0.31%) -0.08s (- 0.61%) 13.63s 13.83s
Compiler-Unions - node (v10.16.3, x64)
Memory used 202,978k (± 0.09%) 203,079k (± 0.02%) +101k (+ 0.05%) 202,950k 203,139k
Parse Time 0.78s (± 0.60%) 0.78s (± 0.51%) +0.00s (+ 0.13%) 0.77s 0.79s
Bind Time 0.52s (± 1.32%) 0.52s (± 1.62%) +0.01s (+ 0.97%) 0.50s 0.54s
Check Time 7.50s (± 0.79%) 7.46s (± 0.71%) -0.04s (- 0.57%) 7.35s 7.59s
Emit Time 2.59s (± 0.42%) 2.57s (± 0.68%) -0.02s (- 0.77%) 2.55s 2.61s
Total Time 11.39s (± 0.58%) 11.34s (± 0.48%) -0.06s (- 0.52%) 11.23s 11.50s
Monaco - node (v10.16.3, x64)
Memory used 342,128k (± 0.02%) 342,252k (± 0.03%) +124k (+ 0.04%) 342,119k 342,533k
Parse Time 1.56s (± 0.55%) 1.55s (± 0.78%) -0.02s (- 1.09%) 1.50s 1.56s
Bind Time 0.74s (± 0.88%) 0.74s (± 0.49%) -0.00s (- 0.27%) 0.73s 0.74s
Check Time 5.26s (± 0.55%) 5.21s (± 0.40%) -0.05s (- 0.89%) 5.17s 5.26s
Emit Time 3.16s (± 0.90%) 3.12s (± 0.75%) -0.04s (- 1.20%) 3.05s 3.15s
Total Time 10.72s (± 0.52%) 10.61s (± 0.34%) -0.10s (- 0.97%) 10.51s 10.70s
TFS - node (v10.16.3, x64)
Memory used 303,989k (± 0.02%) 304,034k (± 0.02%) +45k (+ 0.01%) 303,922k 304,199k
Parse Time 1.21s (± 0.78%) 1.20s (± 0.28%) -0.01s (- 0.82%) 1.20s 1.21s
Bind Time 0.70s (± 0.80%) 0.70s (± 0.82%) +0.00s (+ 0.29%) 0.69s 0.71s
Check Time 4.71s (± 0.36%) 4.70s (± 0.54%) -0.01s (- 0.25%) 4.65s 4.77s
Emit Time 3.26s (± 1.33%) 3.23s (± 1.02%) -0.03s (- 0.89%) 3.19s 3.31s
Total Time 9.88s (± 0.45%) 9.83s (± 0.47%) -0.05s (- 0.50%) 9.75s 9.93s
material-ui - node (v10.16.3, x64)
Memory used 465,216k (± 0.02%) 465,232k (± 0.02%) +17k (+ 0.00%) 465,049k 465,417k
Parse Time 1.99s (± 0.76%) 1.99s (± 0.47%) +0.00s (+ 0.10%) 1.96s 2.01s
Bind Time 0.65s (± 1.12%) 0.66s (± 0.84%) +0.01s (+ 1.54%) 0.64s 0.67s
Check Time 14.15s (± 0.44%) 14.18s (± 0.28%) +0.03s (+ 0.21%) 14.08s 14.26s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.78s (± 0.36%) 16.83s (± 0.23%) +0.04s (+ 0.27%) 16.76s 16.91s
Angular - node (v12.1.0, x64)
Memory used 321,761k (± 0.02%) 322,149k (± 0.03%) +389k (+ 0.12%) 321,935k 322,370k
Parse Time 1.89s (± 0.66%) 1.92s (± 0.49%) +0.03s (+ 1.64%) 1.90s 1.95s
Bind Time 0.81s (± 1.04%) 0.82s (± 0.93%) +0.01s (+ 0.87%) 0.80s 0.84s
Check Time 4.99s (± 0.57%) 4.98s (± 0.29%) -0.01s (- 0.22%) 4.93s 4.99s
Emit Time 5.97s (± 0.56%) 5.99s (± 0.51%) +0.02s (+ 0.35%) 5.94s 6.08s
Total Time 13.66s (± 0.42%) 13.71s (± 0.22%) +0.05s (+ 0.34%) 13.65s 13.78s
Compiler-Unions - node (v12.1.0, x64)
Memory used 189,658k (± 0.14%) 189,724k (± 0.15%) +67k (+ 0.04%) 188,715k 190,196k
Parse Time 0.77s (± 0.68%) 0.77s (± 0.64%) -0.00s (- 0.39%) 0.76s 0.78s
Bind Time 0.52s (± 0.91%) 0.53s (± 0.98%) +0.01s (+ 1.15%) 0.52s 0.54s
Check Time 7.01s (± 0.68%) 6.97s (± 0.66%) -0.04s (- 0.60%) 6.87s 7.08s
Emit Time 2.58s (± 0.78%) 2.55s (± 1.08%) -0.02s (- 0.93%) 2.50s 2.62s
Total Time 10.88s (± 0.53%) 10.82s (± 0.43%) -0.06s (- 0.54%) 10.71s 10.93s
Monaco - node (v12.1.0, x64)
Memory used 324,548k (± 0.01%) 324,563k (± 0.01%) +15k (+ 0.00%) 324,481k 324,707k
Parse Time 1.53s (± 0.58%) 1.53s (± 0.82%) +0.01s (+ 0.46%) 1.50s 1.56s
Bind Time 0.72s (± 0.41%) 0.72s (± 0.41%) 0.00s ( 0.00%) 0.71s 0.72s
Check Time 5.06s (± 0.46%) 5.06s (± 0.72%) +0.00s (+ 0.08%) 5.00s 5.14s
Emit Time 3.11s (± 0.64%) 3.11s (± 1.29%) +0.00s (+ 0.06%) 3.05s 3.22s
Total Time 10.42s (± 0.35%) 10.43s (± 0.74%) +0.01s (+ 0.11%) 10.32s 10.60s
TFS - node (v12.1.0, x64)
Memory used 288,277k (± 0.02%) 288,254k (± 0.02%) -23k (- 0.01%) 288,146k 288,358k
Parse Time 1.21s (± 1.07%) 1.22s (± 1.10%) +0.00s (+ 0.16%) 1.19s 1.26s
Bind Time 0.69s (± 0.58%) 0.69s (± 0.94%) +0.00s (+ 0.14%) 0.68s 0.71s
Check Time 4.61s (± 0.47%) 4.63s (± 0.62%) +0.01s (+ 0.26%) 4.56s 4.68s
Emit Time 3.19s (± 1.82%) 3.16s (± 0.57%) -0.03s (- 0.94%) 3.12s 3.21s
Total Time 9.70s (± 0.84%) 9.69s (± 0.51%) -0.01s (- 0.12%) 9.60s 9.82s
material-ui - node (v12.1.0, x64)
Memory used 443,379k (± 0.01%) 443,427k (± 0.01%) +48k (+ 0.01%) 443,339k 443,549k
Parse Time 2.00s (± 0.41%) 2.02s (± 0.50%) +0.02s (+ 1.00%) 2.00s 2.04s
Bind Time 0.64s (± 0.73%) 0.64s (± 0.58%) -0.00s (- 0.78%) 0.63s 0.64s
Check Time 12.90s (± 0.68%) 12.83s (± 0.56%) -0.07s (- 0.52%) 12.71s 13.03s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.53s (± 0.61%) 15.48s (± 0.51%) -0.05s (- 0.32%) 15.36s 15.70s
Angular - node (v14.15.1, x64)
Memory used 320,305k (± 0.09%) 320,853k (± 0.01%) +548k (+ 0.17%) 320,815k 320,926k
Parse Time 1.91s (± 0.59%) 1.91s (± 0.37%) +0.00s (+ 0.10%) 1.90s 1.93s
Bind Time 0.85s (± 0.94%) 0.85s (± 0.43%) +0.00s (+ 0.35%) 0.85s 0.86s
Check Time 5.00s (± 0.78%) 4.97s (± 0.28%) -0.03s (- 0.58%) 4.94s 5.00s
Emit Time 6.31s (± 1.13%) 6.27s (± 0.43%) -0.03s (- 0.54%) 6.20s 6.32s
Total Time 14.07s (± 0.68%) 14.01s (± 0.22%) -0.06s (- 0.40%) 13.96s 14.10s
Compiler-Unions - node (v14.15.1, x64)
Memory used 189,212k (± 0.01%) 189,208k (± 0.01%) -4k (- 0.00%) 189,177k 189,236k
Parse Time 0.80s (± 0.84%) 0.80s (± 0.77%) +0.00s (+ 0.50%) 0.79s 0.81s
Bind Time 0.56s (± 0.65%) 0.55s (± 0.66%) -0.00s (- 0.36%) 0.55s 0.56s
Check Time 7.04s (± 0.60%) 7.02s (± 0.42%) -0.02s (- 0.26%) 6.95s 7.07s
Emit Time 2.54s (± 0.40%) 2.53s (± 0.43%) -0.01s (- 0.28%) 2.51s 2.56s
Total Time 10.93s (± 0.32%) 10.91s (± 0.24%) -0.02s (- 0.18%) 10.83s 10.94s
Monaco - node (v14.15.1, x64)
Memory used 323,500k (± 0.00%) 323,508k (± 0.00%) +9k (+ 0.00%) 323,490k 323,543k
Parse Time 1.56s (± 0.49%) 1.56s (± 0.90%) +0.01s (+ 0.45%) 1.54s 1.61s
Bind Time 0.74s (± 0.50%) 0.75s (± 0.46%) +0.00s (+ 0.27%) 0.74s 0.75s
Check Time 5.02s (± 0.33%) 4.98s (± 0.33%) -0.03s (- 0.64%) 4.95s 5.02s
Emit Time 3.15s (± 0.59%) 3.13s (± 0.39%) -0.01s (- 0.38%) 3.11s 3.16s
Total Time 10.47s (± 0.32%) 10.43s (± 0.32%) -0.04s (- 0.34%) 10.36s 10.52s
TFS - node (v14.15.1, x64)
Memory used 287,393k (± 0.00%) 287,402k (± 0.01%) +9k (+ 0.00%) 287,370k 287,431k
Parse Time 1.25s (± 1.30%) 1.24s (± 0.96%) -0.01s (- 0.96%) 1.22s 1.28s
Bind Time 0.71s (± 0.83%) 0.72s (± 0.66%) +0.00s (+ 0.42%) 0.71s 0.73s
Check Time 4.64s (± 0.49%) 4.62s (± 0.41%) -0.01s (- 0.30%) 4.58s 4.67s
Emit Time 3.25s (± 0.45%) 3.24s (± 0.51%) -0.01s (- 0.40%) 3.20s 3.28s
Total Time 9.86s (± 0.30%) 9.82s (± 0.31%) -0.04s (- 0.38%) 9.75s 9.90s
material-ui - node (v14.15.1, x64)
Memory used 441,633k (± 0.00%) 441,646k (± 0.06%) +14k (+ 0.00%) 440,637k 441,815k
Parse Time 2.06s (± 0.72%) 2.06s (± 0.35%) +0.00s (+ 0.00%) 2.04s 2.07s
Bind Time 0.69s (± 0.86%) 0.69s (± 0.94%) -0.00s (- 0.29%) 0.68s 0.71s
Check Time 12.95s (± 0.59%) 12.96s (± 0.93%) +0.01s (+ 0.08%) 12.78s 13.41s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.70s (± 0.45%) 15.71s (± 0.80%) +0.01s (+ 0.06%) 15.53s 16.18s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-198-generic
Architecturex64
Available Memory16 GB
Available Memory4 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
Benchmark Name Iterations
Current 43312 10
Baseline master 10

Developer Information:

Download Benchmark

@sandersn
Copy link
Member Author

sandersn commented Mar 22, 2021

Perf looks good; only angular's memory usage goes up.

Edit: DT is fine too, but I only ran that as insurance.

@sandersn sandersn merged commit dcc27eb into master Mar 22, 2021
@sandersn sandersn deleted the fix-link-parsing-comment-end branch March 22, 2021 23:39
ltm added a commit to stenciljs/core that referenced this pull request Oct 12, 2021
rwaskiewicz pushed a commit to stenciljs/core that referenced this pull request Oct 19, 2021
update typescript to v4.3.5

add type annotations to methods that have an implicit any type in TS 4.3 - for more information, see microsoft/TypeScript#26623

map TS 4.3+ `JSDocTagInfo` to `CompilerJsDocTagInfo` - for more information, see microsoft/TypeScript#43312

add type guard for `TestingSystem`. in TS 4.3, `Object.defineProperties` is now generic, and returns the same type `T` as it's first argument. adding a typeguard allows consumers of this method to ensure they're receiving a `TestingSystem` object

enable `noImplicitOverride` compiler flag
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.

4 participants