Skip to content
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

Skip markLinkedReferences import elision walk entirely in some common cases #59398

Merged

Conversation

weswigham
Copy link
Member

@weswigham weswigham commented Jul 23, 2024

This should just improve performance of js->js emit with noCheck on.

@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 23, 2024

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

Command Status Results
perf test this ✅ Started 👀 Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@weswigham weswigham marked this pull request as ready for review July 23, 2024 20:58
checkIdentifierCalculateNodeCheckFlags(node, s);
nodeLinks.calculatedFlags |= NodeCheckFlags.ConstructorReference;
if (isIdentifier(node)) {
nodeLinks.calculatedFlags |= NodeCheckFlags.BlockScopedBindingInLoop | NodeCheckFlags.CapturedBlockScopedBinding; // Can't set on all arbitrary nodes (these nodes have this flag set by `checkSingleBlockScopeBinding` only)
Copy link
Member Author

Choose a reason for hiding this comment

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

The references walk was implicitly calling checkComputedPropertyName on the computed properties, which was calculating the CapturedBlockScopedBinding and BlockScopedBindingInLoop flag on them, which was hiding the fact that preemptively setting these computed flags on all nodes we walk while walking only identifiers would block us from calculating them properly for computed and private names. So that's fixed here, too.

@weswigham weswigham requested a review from sandersn July 23, 2024 21:00
@@ -961,6 961,7 @@ export function emitFiles(
}

function markLinkedReferences(file: SourceFile) {
if (ts.isSourceFileJS(file)) return; // JS files don't use reference calculations as they don't do import ellision, no need to calculate it
Copy link
Member

Choose a reason for hiding this comment

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

Hopefully we remember to remove this if/when decorator metadata becomes a thing again with non-experimental decorators, since preserving imports used for those types I think will end up mattering even in JS files (cross this issue with that other bug I fixed).

Actually, does this work for JSX files? or does this trigger that other bug where we don't realize that import "react" is going to happen?

Copy link
Member

Choose a reason for hiding this comment

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

e.g. should we copy the test from #59193 and make it a .jsx file?

Copy link
Member Author

Choose a reason for hiding this comment

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

In JSX files the import "react" we add to the output is injected by the emitter based on compiler options and doesn't depend on the refrenced-ness of the synthetic import thing in the checker (you can check pretty easily by seeing there's no resolver.isReferencedAliasDeclaration type calls in the jsx transform - only in the ts transform, and only if the file isn't JS).

Copy link
Member Author

Choose a reason for hiding this comment

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

But yeah, should circumstances change and shouldEmitAliasDeclaration in ts.ts changes, this'd need to change to match.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fun fact: I tried skipping this walk for files with nothing in their .imports member, too (so no references to external modules), but tests showed that we still needed import elision calculation done even in files with no external imports, because local elision on export import a = b statements is done using the same logic and relies on this running to work. And there's no simple way to know if those are present without traversing the tree anyway. 🤷‍♂️ I could have done if (!length(file.imports) && !(file.transformFlags & TransformFlags.TypeScript)) return; (since export import = is TS syntax), but how many .ts files don't contain any typescript syntax - hardly seems worth it.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I guess it doesn't matter because we don't care about exact errors in this case, yeah.

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 193,501k (± 0.94%) 193,496k (± 0.96%) ~ 192,268k 195,949k p=0.689 n=6
Parse Time 1.31s (± 0.89%) 1.30s (± 0.63%) ~ 1.29s 1.31s p=0.401 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.56s (± 0.64%) 9.53s (± 0.24%) ~ 9.49s 9.55s p=0.572 n=6
Emit Time 2.74s (± 0.81%) 2.74s (± 0.55%) ~ 2.72s 2.76s p=0.620 n=6
Total Time 14.31s (± 0.49%) 14.29s (± 0.18%) ~ 14.25s 14.32s p=0.374 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,532 945,532 ~ ~ ~ p=1.000 n=6
Types 409,507 409,507 ~ ~ ~ p=1.000 n=6
Memory used 1,221,164k (± 0.00%) 1,221,140k (± 0.00%) ~ 1,221,073k 1,221,178k p=0.230 n=6
Parse Time 6.59s (± 0.31%) 6.60s (± 0.45%) ~ 6.57s 6.65s p=0.624 n=6
Bind Time 1.86s (± 0.28%) 1.86s (± 0.56%) ~ 1.84s 1.87s p=0.928 n=6
Check Time 31.05s (± 0.42%) 31.11s (± 0.19%) ~ 31.01s 31.17s p=0.297 n=6
Emit Time 14.99s (± 0.69%) 15.10s (± 0.57%) ~ 14.96s 15.19s p=0.126 n=6
Total Time 54.48s (± 0.36%) 54.67s (± 0.17%) ~ 54.53s 54.80s p=0.066 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,276,404 2,276,404 ~ ~ ~ p=1.000 n=6
Types 949,156 949,156 ~ ~ ~ p=1.000 n=6
Memory used 2,208,333k (± 0.00%) 2,208,300k (± 0.00%) ~ 2,208,239k 2,208,415k p=0.230 n=6
Parse Time 7.85s (± 0.31%) 7.83s (± 0.40%) ~ 7.79s 7.87s p=0.372 n=6
Bind Time 2.74s (± 0.36%) 2.73s (± 0.60%) ~ 2.71s 2.76s p=0.315 n=6
Check Time 86.02s (± 0.32%) 86.42s (± 0.49%) ~ 85.98s 86.90s p=0.230 n=6
Emit Time 0.17s (± 2.98%) 0.17s (± 3.72%) ~ 0.16s 0.18s p=0.386 n=6
Total Time 96.78s (± 0.27%) 97.16s (± 0.44%) ~ 96.68s 97.62s p=0.230 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,231,162 1,231,162 ~ ~ ~ p=1.000 n=6
Types 266,119 266,119 ~ ~ ~ p=1.000 n=6
Memory used 2,348,768k (± 0.01%) 2,348,671k (± 0.01%) ~ 2,348,294k 2,349,041k p=0.810 n=6
Parse Time 5.08s (± 0.69%) 5.09s (± 0.92%) ~ 5.02s 5.15s p=0.936 n=6
Bind Time 1.90s (± 0.96%) 1.90s (± 0.79%) ~ 1.89s 1.92s p=1.000 n=6
Check Time 34.63s (± 0.26%) 34.71s (± 0.36%) ~ 34.58s 34.91s p=0.199 n=6
Emit Time 3.34s (± 0.77%) 3.32s (± 1.28%) ~ 3.27s 3.36s p=0.378 n=6
Total Time 44.97s (± 0.24%) 45.02s (± 0.39%) ~ 44.84s 45.31s p=0.936 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,231,162 1,231,162 ~ ~ ~ p=1.000 n=6
Types 266,119 266,119 ~ ~ ~ p=1.000 n=6
Memory used 2,423,087k (± 0.03%) 2,541,819k (±11.41%) ~ 2,422,996k 3,134,265k p=0.378 n=6
Parse Time 6.30s (± 0.68%) 6.37s (± 1.25%) ~ 6.26s 6.48s p=0.092 n=6
Bind Time 2.04s (± 0.57%) 2.02s (± 0.97%) ~ 2.00s 2.04s p=0.050 n=6
Check Time 41.43s (± 0.47%) 41.51s (± 0.46%) ~ 41.32s 41.79s p=0.298 n=6
Emit Time 4.00s (± 1.15%) 3.99s (± 1.77%) ~ 3.91s 4.07s p=0.872 n=6
Total Time 53.78s (± 0.46%) 53.87s (± 0.43%) ~ 53.64s 54.17s p=0.378 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 259,215 259,215 ~ ~ ~ p=1.000 n=6
Types 105,867 105,867 ~ ~ ~ p=1.000 n=6
Memory used 429,592k (± 0.03%) 429,629k (± 0.03%) ~ 429,500k 429,820k p=0.471 n=6
Parse Time 3.35s (± 0.79%) 3.34s (± 0.58%) ~ 3.32s 3.37s p=0.627 n=6
Bind Time 1.32s (± 1.42%) 1.32s (± 1.41%) ~ 1.29s 1.34s p=0.935 n=6
Check Time 18.05s (± 0.34%) 18.02s (± 0.32%) ~ 17.96s 18.12s p=0.422 n=6
Emit Time 1.62s (± 2.09%) 1.62s (± 2.57%) ~ 1.58s 1.68s p=0.872 n=6
Total Time 24.33s (± 0.34%) 24.30s (± 0.31%) ~ 24.23s 24.40s p=0.470 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,931 224,931 ~ ~ ~ p=1.000 n=6
Types 94,146 94,146 ~ ~ ~ p=1.000 n=6
Memory used 369,994k (± 0.01%) 370,016k (± 0.03%) ~ 369,866k 370,119k p=0.471 n=6
Parse Time 2.76s (± 0.93%) 2.78s (± 0.68%) ~ 2.76s 2.80s p=0.329 n=6
Bind Time 1.58s (± 1.31%) 1.58s (± 0.62%) ~ 1.57s 1.59s p=0.677 n=6
Check Time 15.66s (± 0.34%) 15.62s (± 0.33%) ~ 15.54s 15.68s p=0.260 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.01s (± 0.42%) 19.98s (± 0.30%) ~ 19.88s 20.04s p=0.686 n=6
vscode - node (v18.15.0, x64)
Errors 11 11 ~ ~ ~ p=1.000 n=6
Symbols 2,986,659 2,986,659 ~ ~ ~ p=1.000 n=6
Types 1,027,499 1,027,499 ~ ~ ~ p=1.000 n=6
Memory used 3,111,106k (± 0.00%) 3,111,123k (± 0.00%) ~ 3,111,051k 3,111,238k p=0.936 n=6
Parse Time 13.84s (± 0.31%) 13.80s (± 0.28%) ~ 13.74s 13.83s p=0.125 n=6
Bind Time 4.29s (± 0.18%) 4.30s (± 0.17%) ~ 4.29s 4.31s p=0.062 n=6
Check Time 79.38s (± 0.22%) 79.04s (± 0.17%) -0.33s (- 0.42%) 78.88s 79.20s p=0.006 n=6
Emit Time 20.48s (± 0.54%) 20.41s (± 0.44%) ~ 20.33s 20.56s p=0.378 n=6
Total Time 117.99s (± 0.20%) 117.55s (± 0.18%) -0.45s (- 0.38%) 117.26s 117.80s p=0.016 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 267,603 267,603 ~ ~ ~ p=1.000 n=6
Types 109,105 109,105 ~ ~ ~ p=1.000 n=6
Memory used 412,374k (± 0.01%) 412,346k (± 0.03%) ~ 412,207k 412,544k p=0.378 n=6
Parse Time 4.74s (± 0.26%) 4.75s (± 0.44%) ~ 4.72s 4.77s p=0.624 n=6
Bind Time 2.13s (± 0.49%) 2.13s (± 0.46%) ~ 2.11s 2.14s p=0.788 n=6
Check Time 20.77s (± 0.26%) 20.78s (± 0.36%) ~ 20.71s 20.92s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.64s (± 0.16%) 27.65s (± 0.31%) ~ 27.59s 27.82s p=0.935 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 511,803 511,803 ~ ~ ~ p=1.000 n=6
Types 162,088 162,088 ~ ~ ~ p=1.000 n=6
Memory used 448,993k (± 0.08%) 449,049k (± 0.08%) ~ 448,567k 449,442k p=1.000 n=6
Parse Time 3.17s (± 1.04%) 3.16s (± 0.48%) ~ 3.14s 3.18s p=0.513 n=6
Bind Time 1.16s (± 0.44%) 1.17s (± 0.90%) ~ 1.15s 1.18s p=0.794 n=6
Check Time 17.24s (± 0.39%) 17.20s (± 0.38%) ~ 17.12s 17.30s p=0.375 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.57s (± 0.26%) 21.53s (± 0.25%) ~ 21.46s 21.61s p=0.230 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - 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)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

Hey @weswigham, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@weswigham Here are the results of running the user tests with tsc comparing main and refs/pull/59398/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 193,369k (± 0.96%) 193,433k (± 0.93%) ~ 192,211k 195,833k p=0.810 n=6
Parse Time 1.95s (± 0.77%) 1.96s (± 0.53%) ~ 1.95s 1.98s p=0.161 n=6
Bind Time 1.07s (± 1.09%) 1.05s (± 1.20%) -0.02s (- 1.72%) 1.04s 1.07s p=0.041 n=6
Check Time 14.00s (± 0.57%) 13.99s (± 0.41%) ~ 13.93s 14.08s p=0.520 n=6
Emit Time 4.16s (± 4.63%) 4.00s (± 1.40%) ~ 3.89s 4.05s p=0.076 n=6
Total Time 21.18s (± 0.81%) 20.99s (± 0.28%) -0.18s (- 0.87%) 20.90s 21.06s p=0.025 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,532 945,532 ~ ~ ~ p=1.000 n=6
Types 409,507 409,507 ~ ~ ~ p=1.000 n=6
Memory used 1,221,118k (± 0.00%) 1,221,126k (± 0.00%) ~ 1,221,109k 1,221,147k p=0.936 n=6
Parse Time 7.86s (± 0.56%) 7.88s (± 0.71%) ~ 7.80s 7.97s p=0.746 n=6
Bind Time 2.22s (± 0.78%) 2.21s (± 0.74%) ~ 2.20s 2.24s p=0.086 n=6
Check Time 36.28s (± 0.25%) 36.34s (± 0.40%) ~ 36.05s 36.46s p=0.148 n=6
Emit Time 17.77s (± 0.53%) 17.85s (± 0.38%) ~ 17.76s 17.95s p=0.148 n=6
Total Time 64.13s (± 0.22%) 64.28s (± 0.30%) ~ 63.91s 64.48s p=0.066 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,276,404 2,276,404 ~ ~ ~ p=1.000 n=6
Types 949,156 949,156 ~ ~ ~ p=1.000 n=6
Memory used 2,208,279k (± 0.00%) 2,208,316k (± 0.00%) ~ 2,208,201k 2,208,376k p=0.261 n=6
Parse Time 7.83s (± 0.36%) 7.81s (± 0.28%) ~ 7.78s 7.84s p=0.331 n=6
Bind Time 2.73s (± 0.30%) 2.73s (± 0.64%) ~ 2.72s 2.76s p=0.730 n=6
Check Time 85.87s (± 0.17%) 85.61s (± 0.54%) ~ 85.13s 86.29s p=0.298 n=6
Emit Time 0.17s (± 4.89%) 0.17s (± 4.38%) ~ 0.16s 0.18s p=0.306 n=6
Total Time 96.59s (± 0.13%) 96.33s (± 0.47%) ~ 95.87s 97.02s p=0.199 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,231,162 1,231,162 ~ ~ ~ p=1.000 n=6
Types 266,119 266,119 ~ ~ ~ p=1.000 n=6
Memory used 2,349,643k (± 0.03%) 2,349,990k (± 0.03%) ~ 2,349,446k 2,351,441k p=1.000 n=6
Parse Time 7.56s (± 0.86%) 7.59s (± 1.10%) ~ 7.45s 7.69s p=0.471 n=6
Bind Time 2.79s (± 0.90%) 2.79s (± 0.54%) ~ 2.77s 2.81s p=0.686 n=6
Check Time 50.45s (± 0.39%) 50.47s (± 0.25%) ~ 50.33s 50.69s p=0.936 n=6
Emit Time 4.92s (± 2.01%) 4.80s (± 1.70%) ~ 4.65s 4.89s p=0.093 n=6
Total Time 65.71s (± 0.40%) 65.66s (± 0.20%) ~ 65.47s 65.85s p=0.936 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,231,162 1,231,162 ~ ~ ~ p=1.000 n=6
Types 266,119 266,119 ~ ~ ~ p=1.000 n=6
Memory used 2,422,990k (± 0.02%) 2,423,012k (± 0.02%) ~ 2,422,617k 2,423,961k p=0.936 n=6
Parse Time 5.29s (± 0.49%) 5.30s (± 0.95%) ~ 5.25s 5.38s p=0.873 n=6
Bind Time 1.69s (± 0.45%) 1.69s (± 0.58%) ~ 1.68s 1.70s p=0.554 n=6
Check Time 35.24s (± 0.19%) 35.22s (± 0.24%) ~ 35.10s 35.35s p=0.873 n=6
Emit Time 3.35s (± 2.06%) 3.34s (± 1.03%) ~ 3.29s 3.37s p=0.375 n=6
Total Time 45.58s (± 0.12%) 45.55s (± 0.27%) ~ 45.42s 45.76s p=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 259,215 259,215 ~ ~ ~ p=1.000 n=6
Types 105,867 105,867 ~ ~ ~ p=1.000 n=6
Memory used 429,604k (± 0.03%) 429,804k (± 0.06%) ~ 429,551k 430,079k p=0.128 n=6
Parse Time 3.35s (± 0.45%) 3.35s (± 0.72%) ~ 3.32s 3.39s p=0.871 n=6
Bind Time 1.32s (± 1.14%) 1.33s (± 1.13%) ~ 1.30s 1.34s p=0.737 n=6
Check Time 18.07s (± 0.22%) 18.07s (± 0.55%) ~ 17.97s 18.25s p=0.872 n=6
Emit Time 1.62s (± 1.97%) 1.66s (± 1.52%) 0.04s ( 2.57%) 1.62s 1.69s p=0.044 n=6
Total Time 24.36s (± 0.30%) 24.41s (± 0.42%) ~ 24.26s 24.55s p=0.297 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,931 224,931 ~ ~ ~ p=1.000 n=6
Types 94,146 94,146 ~ ~ ~ p=1.000 n=6
Memory used 370,035k (± 0.03%) 370,055k (± 0.03%) ~ 369,956k 370,247k p=0.810 n=6
Parse Time 2.28s (± 1.23%) 2.30s (± 0.93%) ~ 2.27s 2.32s p=0.332 n=6
Bind Time 1.32s (± 1.47%) 1.33s (± 1.30%) ~ 1.31s 1.35s p=0.557 n=6
Check Time 13.29s (± 0.35%) 13.30s (± 0.33%) ~ 13.23s 13.37s p=0.629 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 16.90s (± 0.47%) 16.93s (± 0.37%) ~ 16.88s 17.03s p=0.198 n=6
vscode - node (v18.15.0, x64)
Errors 11 11 ~ ~ ~ p=1.000 n=6
Symbols 2,986,659 2,986,659 ~ ~ ~ p=1.000 n=6
Types 1,027,499 1,027,499 ~ ~ ~ p=1.000 n=6
Memory used 3,111,115k (± 0.00%) 3,111,141k (± 0.00%) ~ 3,111,098k 3,111,188k p=0.336 n=6
Parse Time 11.58s (± 0.15%) 11.57s (± 0.33%) ~ 11.51s 11.61s p=0.515 n=6
Bind Time 3.63s (± 2.16%) 3.65s (± 2.57%) ~ 3.58s 3.78s p=0.805 n=6
Check Time 68.59s (± 0.47%) 68.51s (± 0.39%) ~ 68.24s 68.89s p=0.810 n=6
Emit Time 17.36s (± 0.63%) 17.40s (± 0.58%) ~ 17.26s 17.52s p=0.810 n=6
Total Time 101.17s (± 0.38%) 101.13s (± 0.27%) ~ 100.83s 101.47s p=0.810 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 267,603 267,603 ~ ~ ~ p=1.000 n=6
Types 109,105 109,105 ~ ~ ~ p=1.000 n=6
Memory used 412,341k (± 0.02%) 412,364k (± 0.02%) ~ 412,285k 412,487k p=0.575 n=6
Parse Time 4.75s (± 0.46%) 4.75s (± 0.69%) ~ 4.72s 4.80s p=0.517 n=6
Bind Time 2.12s (± 0.63%) 2.12s (± 0.69%) ~ 2.10s 2.14s p=0.681 n=6
Check Time 20.77s (± 0.36%) 20.76s (± 0.45%) ~ 20.68s 20.93s p=0.748 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.64s (± 0.28%) 27.62s (± 0.40%) ~ 27.52s 27.83s p=0.470 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 511,803 511,803 ~ ~ ~ p=1.000 n=6
Types 162,088 162,088 ~ ~ ~ p=1.000 n=6
Memory used 449,122k (± 0.08%) 449,092k (± 0.07%) ~ 448,690k 449,347k p=0.810 n=6
Parse Time 3.15s (± 0.71%) 3.16s (± 0.79%) ~ 3.12s 3.19s p=0.466 n=6
Bind Time 1.16s (± 0.35%) 1.16s (± 0.54%) ~ 1.15s 1.17s p=0.673 n=6
Check Time 17.22s (± 0.38%) 17.21s (± 0.50%) ~ 17.12s 17.36s p=0.628 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.54s (± 0.31%) 21.54s (± 0.33%) ~ 21.46s 21.67s p=1.000 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - 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)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,298ms (± 0.42%) 2,297ms (± 0.35%) ~ 2,282ms 2,306ms p=0.630 n=6
Req 2 - geterr 5,156ms (± 0.14%) 5,169ms (± 0.37%) ~ 5,135ms 5,192ms p=0.066 n=6
Req 3 - references 260ms (± 0.86%) 261ms (± 0.78%) ~ 257ms 262ms p=0.390 n=6
Req 4 - navto 227ms (± 0.94%) 227ms (± 0.51%) ~ 226ms 229ms p=0.677 n=6
Req 5 - completionInfo count 1,357 1,357 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 80ms (± 5.92%) 82ms (± 4.04%) ~ 77ms 85ms p=0.511 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,393ms (± 0.31%) 2,424ms (± 1.51%) ~ 2,384ms 2,468ms p=0.226 n=6
Req 2 - geterr 3,887ms (± 0.26%) 3,886ms (± 0.31%) ~ 3,869ms 3,903ms p=1.000 n=6
Req 3 - references 272ms (± 0.87%) 273ms (± 0.50%) ~ 271ms 275ms p=0.370 n=6
Req 4 - navto 234ms (± 3.13%) 230ms (± 2.19%) ~ 227ms 240ms p=0.801 n=6
Req 5 - completionInfo count 1,519 1,519 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 70ms (± 3.99%) 76ms (±10.97%) ~ 66ms 84ms p=0.465 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen 5,177ms (± 0.19%) 5,173ms (± 0.24%) ~ 5,158ms 5,192ms p=0.573 n=6
Req 2 - geterr 1,118ms (± 0.88%) 1,115ms (± 0.94%) ~ 1,105ms 1,132ms p=0.686 n=6
Req 3 - references 85ms (± 4.20%) 86ms (± 0.95%) ~ 84ms 86ms p=0.591 n=6
Req 4 - navto 443ms (± 0.31%) 443ms (± 0.17%) ~ 442ms 444ms p=0.672 n=6
Req 5 - completionInfo count 3,417 3,417 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 816ms (± 1.57%) 832ms (± 0.77%) 15ms ( 1.88%) 820ms 838ms p=0.045 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)
  • xstate-main-1-tsserver - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 188.42ms (± 0.18%) 188.31ms (± 0.16%) -0.11ms (- 0.06%) 186.68ms 191.43ms p=0.003 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 231.01ms (± 0.14%) 231.13ms (± 0.16%) 0.12ms ( 0.05%) 229.79ms 236.78ms p=0.005 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 227.74ms (± 0.16%) 228.13ms (± 0.18%) 0.39ms ( 0.17%) 226.71ms 236.15ms p=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 336.67ms (± 0.31%) 336.88ms (± 0.31%) 0.22ms ( 0.06%) 327.94ms 344.81ms p=0.010 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@weswigham Here are the results of running the top 400 repos with tsc comparing main and refs/pull/59398/merge:

Everything looks good!

@weswigham weswigham merged commit 5bd4e00 into microsoft:main Jul 23, 2024
32 checks passed
@weswigham
Copy link
Member Author

@typescript-bot cherry-pick this into release-5.5

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 23, 2024

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

Command Status Results
cherry-pick this into release-5.5 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

Hey, @weswigham! I've created #86304 for you.

@jakebailey
Copy link
Member

5.5.4 already went out, are we doing a 5.5.5?

@DanielRosenwasser
Copy link
Member

Yeah, I think we should try to unbreak that repro.

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