Skip to content

Dedupe identical object literal types before subtype reduction - #64729

Open
Camille Barneaud (gadcam) wants to merge 5 commits into
microsoft:mainfrom
gadcam:perf/dedupe-identical-object-literals-in-subtype-reduction
Open

Camille Barneaud (gadcam) wants to merge 5 commits into
microsoft:mainfrom
gadcam:perf/dedupe-identical-object-literals-in-subtype-reduction

Conversation

@gadcam

@gadcam Camille Barneaud (gadcam) commented Oct 10, 2026 •

Copy link
Copy Markdown

Fixes #48364: this fixes the checker blow-up on large JSON arrays. Editor responsiveness on very large JSON files may still warrant .d.json.ts.

removeSubtypes relates every pair of union constituents. Array literals of records, typically from resolveJsonModule imports, produce one object literal type per element, so their element type costs O(n²) structural checks, and the relation cache grows with them.

This removes object literal types that are identical to an earlier constituent before the pairwise loop. Identical types are mutual subtypes, so the loop would keep only the first anyway and the reduced type is the same. One visible difference: array literals with many records of one shape followed by another shape (e.g. 1,000 × { a: "" } + 100 × { a: 0 }) no longer hit the subtype reduction limit and report a false TS2590. Two types count as identical when they have the same hash of their object flags and properties (names, flags, check flags and types), like the other CacheHashKey-keyed caches in the checker. Members and property types are only read when they are already resolved (valueSymbolLinks.resolvedType, no accessors, methods, or deferred/instantiated/mapped properties), so the check never triggers type resolution and can't change circularity behavior (see #46981).

Results

colornerd.json from #48364 (29,177 objects, 3 shapes):

before after
check did not finish (>12 min, >4.5 GB RSS) 0.06s

The blow-up starts between 23K and 24K elements. Below that, the same file checks in ~0.1s.

Interleaved A/B runs (Mann-Whitney U on wall time):

project wall p
vscode @ 9cf0128 +0.37% 0.85
typescript-benchmarking Compiler 0% —
app with 5 JSON imports (807-object file with 113 shapes) −12.3% (check −16.5%) <0.001

Type and symbol counts are identical in every run. Declaration emit for the JSON imports is identical.

Tests

arrayLiteralIdenticalObjectLiteralsSubtypeReduction.ts covers JSON records with reordered keys, mixed property types and null, plus the cases the shape key must handle or skip: reordered keys, optional properties, spreads, methods, accessors and as const. Its baselines are byte-identical with and without the checker change, and a temporary trace confirmed the new path runs for most of these cases.

arrayLiteralManyObjectLiteralsNotTooComplex.ts reports TS2590 without this change and no error with it.

AI disclosure

This change was written with Claude Code (investigation, patch, test, and benchmarks). I have reviewed it, understand it, and will handle review feedback myself.

removeSubtypes compares every pair of constituents, which makes array
literals with many records quadratic. Large JSON imports hit this hard:
the colornerd.json file from microsoft#48364 (29K objects) never finishes, using
gigabytes for the relation cache.

Object literal types whose properties have the same names, flags and
already-resolved types are identical, so the pairwise loop would keep
only the first of them anyway. Remove them up front, keyed by a hash of
their shape. Property types are only read when already resolved, so the
new check never triggers type resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 18:01
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Oct 10, 2026
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 10, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@typescript-automation typescript-automation Bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 10, 2026
@gadcam

Copy link
Copy Markdown
Author

TypeScript Bot (@typescript-bot) It fixes issue #48364

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Shape-key computation can trigger member resolution and the test does not detect regression of the optimization.

2 open findings
What changed in this PR

Optimizes subtype reduction by deduplicating structurally identical object literal types before pairwise comparison.

Changes:

  • Adds object-literal shape hashing and deduplication.
  • Adds compiler coverage and generated baselines for JSON and object-literal cases.
File Description
tsc/​internal/​checker/​checker.go Implements shape-based deduplication.
tsc/​testdata/​tests/​cases/​compiler/​arrayLiteralIdenticalObjectLiteralsSubtypeReduction.ts Adds compiler scenarios.
tsc/​testdata/​baselines/​reference/​compiler/​arrayLiteralIdenticalObjectLiteralsSubtypeReduction.types Records inferred types.
tsc/​testdata/​baselines/​reference/​compiler/​arrayLiteralIdenticalObjectLiteralsSubtypeReduction.symbols Records resolved symbols.
tsc/​testdata/​baselines/​reference/​compiler/​arrayLiteralIdenticalObjectLiteralsSubtypeReduction.js Records emit and declarations.

🧠 Review effort: Balanced

Comment thread tsc/internal/checker/checker.go Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The optimization changes core subtype-reduction semantics and warrants final human validation despite comprehensive regression coverage.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) test it

@typescript-automation

typescript-automation Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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

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

@typescript-automation

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
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 - native
Errors 41 41 ~ ~ ~ p=1.000 n=12
Symbols 115,276 115,276 ~ ~ ~ p=1.000 n=12
Types 79,613 79,613 ~ ~ ~ p=1.000 n=12
Memory Used 133,809k (± 0.03%) 133,878k (± 0.05%) ~ 133,670k 134,012k p=0.091 n=12
Memory Allocs 2,190,021 (± 0.01%) 2,190,058 (± 0.01%) ~ 2,189,764 2,190,400 p=0.799 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.041s (± 3.79%) 0.042s (± 3.72%) ~ 0.037s 0.045s p=0.232 n=12
Bind Time 0.012s (±13.52%) 0.013s (±12.11%) ~ 0.010s 0.018s p=0.441 n=12
Check Time 0.500s (± 0.93%) 0.499s (± 0.51%) ~ 0.493s 0.508s p=0.722 n=12
Emit Time 0.270s (± 2.09%) 0.276s (± 2.48%) ~ 0.264s 0.304s p=0.234 n=12
Total Time 0.829s (± 0.85%) 0.836s (± 0.88%) ~ 0.824s 0.867s p=0.127 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 845,477 (± 0.08%) 846,310 (± 0.06%) ~ 844,647 847,517 p=0.078 n=12
Types 248,127 (± 0.00%) 248,125 (± 0.00%) ~ 248,121 248,132 p=0.071 n=12
Memory Used 750,442k (± 0.02%) 750,556k (± 0.01%) ~ 750,275k 750,790k p=0.219 n=12
Memory Allocs 12,911,839 (± 0.01%) 12,920,249 (± 0.05%) +8,410 (+ 0.07%) 12,911,687 12,939,191 p=0.002 n=12
Config Time 0.017s 0.017s ~ ~ ~ p=1.000 n=12
Parse Time 0.252s (± 1.81%) 0.252s (± 3.22%) ~ 0.231s 0.269s p=0.989 n=12
Bind Time 0.063s (±12.54%) 0.065s (±15.03%) ~ 0.056s 0.110s p=0.611 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.556s (± 0.85%) 1.564s (± 0.73%) ~ 1.540s 1.600s p=0.401 n=12
Total Time 1.900s (± 0.99%) 1.912s (± 0.77%) ~ 1.889s 1.970s p=0.070 n=12
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=12
Symbols 4,359,614 4,359,614 ~ ~ ~ p=1.000 n=12
Types 1,376,379 1,376,379 ~ ~ ~ p=1.000 n=12
Memory Used 2,813,046k (± 0.07%) 2,813,395k (± 0.03%) ~ 2,809,593k 2,815,188k p=0.755 n=12
Memory Allocs 32,818,422 (± 0.05%) 32,816,242 (± 0.05%) ~ 32,782,275 32,849,912 p=0.887 n=12
Config Time 0.017s 0.017s ~ ~ ~ p=1.000 n=12
Parse Time 0.494s (± 2.68%) 0.500s (± 2.32%) ~ 0.458s 0.525s p=0.401 n=12
Bind Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Check Time 8.654s (± 0.46%) 8.629s (± 0.51%) ~ 8.486s 8.698s p=0.619 n=12
Emit Time 0.471s (±10.24%) 0.470s (±10.32%) ~ 0.416s 0.657s p=0.989 n=12
Total Time 10.409s (± 0.31%) 10.388s (± 0.44%) ~ 10.226s 10.481s p=0.504 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,390,229 1,390,229 ~ ~ ~ p=1.000 n=12
Types 441,498 441,498 ~ ~ ~ p=1.000 n=12
Memory Used 1,623,210k (± 0.93%) 1,633,020k (± 1.14%) ~ 1,598,343k 1,682,482k p=0.478 n=12
Memory Allocs 92,130,486 (± 0.10%) 92,144,027 (± 0.16%) ~ 91,715,331 92,391,202 p=0.514 n=12
Config Time 0.004s (± 8.72%) 0.004s (± 9.45%) ~ 0.003s 0.005s p=0.584 n=12
Parse Time 0.234s (± 4.47%) 0.244s (± 4.83%) ~ 0.220s 0.283s p=0.147 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 2.160s (± 0.44%) 2.154s (± 0.45%) ~ 2.126s 2.177s p=0.385 n=12
Emit Time 0.370s (± 2.13%) 0.374s (± 3.68%) ~ 0.349s 0.428s p=0.989 n=12
Total Time 28.286s (± 0.61%) 28.435s (± 0.58%) ~ 27.960s 28.798s p=0.178 n=12
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 334,953 334,953 ~ ~ ~ p=1.000 n=12
Types 197,616 197,616 ~ ~ ~ p=1.000 n=12
Memory Used 297,330k (± 0.03%) 297,270k (± 0.03%) ~ 297,022k 297,495k p=0.514 n=12
Memory Allocs 4,621,330 (± 0.01%) 4,621,365 (± 0.01%) ~ 4,619,187 4,622,604 p=0.671 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.117s (± 3.52%) 0.117s (± 4.67%) ~ 0.104s 0.132s p=0.966 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.041s (± 0.44%) 1.037s (± 0.47%) ~ 1.026s 1.051s p=0.283 n=12
Emit Time 0.145s (± 5.01%) 0.147s (± 7.51%) ~ 0.110s 0.174s p=0.486 n=12
Total Time 1.353s (± 0.82%) 1.358s (± 0.89%) ~ 1.322s 1.386s p=0.723 n=12
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=12
Symbols 303,834 303,834 ~ ~ ~ p=1.000 n=12
Types 181,663 181,663 ~ ~ ~ p=1.000 n=12
Memory Used 258,190k (± 0.02%) 258,164k (± 0.02%) ~ 258,078k 258,247k p=0.355 n=12
Memory Allocs 1,613,768 (± 0.01%) 1,614,124 (± 0.02%) ~ 1,613,446 1,615,377 p=0.143 n=12
Config Time 0.000s 0.000s (±217.90%) ~ 0.000s 0.001s p=1.000 n=12
Parse Time 0.098s (± 4.50%) 0.101s (± 4.52%) ~ 0.088s 0.111s p=0.339 n=12
Bind Time 0.038s (±10.62%) 0.036s (± 8.11%) ~ 0.028s 0.045s p=0.521 n=12
Check Time 0.812s (± 0.70%) 0.817s (± 0.82%) ~ 0.799s 0.833s p=0.272 n=12
Emit Time 0.000s 0.000s (±217.90%) ~ 0.000s 0.001s p=1.000 n=12
Total Time 0.961s (± 0.62%) 0.967s (± 0.57%) ~ 0.950s 0.981s p=0.086 n=12
vscode - native
Errors 395 395 ~ ~ ~ p=1.000 n=12
Symbols 11,335,260 11,335,260 ~ ~ ~ p=1.000 n=12
Types 3,740,503 3,740,503 ~ ~ ~ p=1.000 n=12
Memory Used 6,536,567k (± 0.01%) 6,534,450k (± 0.01%) -2,117k (- 0.03%) 6,533,060k 6,537,788k p=0.002 n=12
Memory Allocs 55,420,190 (± 0.01%) 55,483,359 (± 0.01%) +63,169 (+ 0.11%) 55,474,779 55,509,499 p=0.000 n=12
Config Time 0.075s (± 0.43%) 0.075s (± 0.24%) ~ 0.075s 0.076s p=0.155 n=12
Parse Time 1.835s (± 3.47%) 1.797s (± 3.48%) ~ 1.685s 2.017s p=0.370 n=12
Bind Time 0.618s (±19.44%) 0.687s (±15.50%) ~ 0.450s 0.912s p=0.340 n=12
Check Time 14.014s (± 1.08%) 13.943s (± 1.11%) ~ 13.719s 14.366s p=0.855 n=12
Emit Time 5.048s (±10.43%) 5.447s (± 9.25%) ~ 4.304s 6.207s p=0.128 n=12
Total Time 21.677s (± 2.06%) 22.039s (± 1.87%) ~ 21.090s 22.729s p=0.160 n=12
webpack - native
Errors 585 585 ~ ~ ~ p=1.000 n=12
Symbols 1,317,332 1,317,332 ~ ~ ~ p=1.000 n=12
Types 619,546 619,546 ~ ~ ~ p=1.000 n=12
Memory Used 954,456k (± 0.02%) 954,413k (± 0.01%) ~ 954,059k 954,738k p=0.799 n=12
Memory Allocs 6,672,446 (± 0.03%) 6,675,083 (± 0.02%) +2,636 (+ 0.04%) 6,672,894 6,681,086 p=0.007 n=12
Config Time 0.009s 0.009s ~ ~ ~ p=1.000 n=12
Parse Time 0.299s (± 3.68%) 0.300s (± 2.83%) ~ 0.280s 0.323s p=0.619 n=12
Bind Time 0.083s (±15.33%) 0.076s (±11.88%) ~ 0.066s 0.113s p=0.679 n=12
Check Time 2.397s (± 0.43%) 2.402s (± 0.46%) ~ 2.370s 2.431s p=0.417 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 2.824s (± 0.39%) 2.824s (± 0.40%) ~ 2.799s 2.856s p=0.966 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,061,928 1,061,928 ~ ~ ~ p=1.000 n=12
Types 389,645 389,645 ~ ~ ~ p=1.000 n=12
Memory Used 554,339k (± 0.02%) 554,176k (± 0.01%) -163k (- 0.03%) 554,001k 554,500k p=0.021 n=12
Memory Allocs 4,883,993 (± 0.10%) 4,885,233 (± 0.06%) ~ 4,877,559 4,890,962 p=0.410 n=12
Config Time 0.003s 0.003s ~ ~ ~ p=1.000 n=12
Parse Time 0.143s (± 2.91%) 0.145s (± 3.98%) ~ 0.129s 0.160s p=0.466 n=12
Bind Time 0.048s (±19.57%) 0.043s (±17.73%) ~ 0.033s 0.070s p=0.521 n=12
Check Time 1.121s (± 0.45%) 1.128s (± 0.33%) +0.007s (+ 0.66%) 1.116s 1.137s p=0.021 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.324s (± 0.79%) 1.328s (± 0.65%) ~ 1.312s 1.348s p=0.347 n=12
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • mui-docs - native
  • strada-build-src - native
  • strada-compiler - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

@typescript-automation

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-automation

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests with tsc comparing baseline and pr:

Everything looks good!

@typescript-automation

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos with tsc comparing baseline and pr:

Everything looks good!

@gadcam

Copy link
Copy Markdown
Author

Jake Bailey (@jakebailey) The Oct 12 test run came back clean (perf neutral, DT / user tests / top400 unchanged). What do you think about this PR?

@gadcam

Copy link
Copy Markdown
Author

Thanks Gabriela Araujo Britto (@gabritto) for kicking off CI!

The failures came from #64915 landing on main, which moved signatures & indexInfos on StructuredType behind accessors.
I merged main and switched to acessors in d156a4d.
Now hereby test, hereby test:tools and hereby lint pass locally.

Could you approve the CI run again when you have a moment?

@jakebailey Jake Bailey (jakebailey) added the Domain: Performance Performance related label Oct 27, 2026
@gabritto

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) perf test this

@typescript-automation

typescript-automation Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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

Command Status Results
perf test this ✅ Started 👀 Results

@typescript-automation

Copy link
Copy Markdown
Contributor

Gabriela Araujo Britto (@gabritto)
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 - native
Errors 41 41 ~ ~ ~ p=1.000 n=20
Symbols 88,381 88,381 ~ ~ ~ p=1.000 n=20
Types 79,151 79,151 ~ ~ ~ p=1.000 n=20
Memory Used 106,284k (± 0.03%) 106,288k (± 0.03%) ~ 106,165k 106,380k p=0.869 n=20
Memory Allocs 1,045,749 (± 0.01%) 1,045,810 (± 0.01%) ~ 1,045,544 1,046,176 p=0.154 n=20
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Parse Time 0.044s (± 2.49%) 0.044s (± 2.46%) ~ 0.040s 0.049s p=0.353 n=20
Bind Time 0.015s (± 8.32%) 0.015s (± 9.58%) ~ 0.011s 0.021s p=0.647 n=20
Check Time 0.453s (± 0.43%) 0.457s (± 0.76%) ~ 0.448s 0.471s p=0.119 n=20
Emit Time 0.258s (± 0.88%) 0.257s (± 0.80%) ~ 0.249s 0.267s p=0.409 n=20
Total Time 0.779s (± 0.42%) 0.779s (± 0.42%) ~ 0.766s 0.793s p=0.984 n=20
angular-1 - native
Errors 63 63 ~ ~ ~ p=1.000 n=20
Symbols 753,805 753,805 ~ ~ ~ p=1.000 n=20
Types 546,821 546,821 ~ ~ ~ p=1.000 n=20
Memory Used 642,566k (± 0.01%) 642,620k (± 0.02%) ~ 642,223k 643,248k p=0.349 n=20
Memory Allocs 8,308,030 (± 0.02%) 8,314,616 (± 0.06%) +4,437 (+ 0.05%) 8,308,188 8,356,088 p=0.000 n=20
Config Time 0.017s (± 1.93%) 0.016s (± 1.77%) ~ 0.015s 0.017s p=0.086 n=20
Parse Time 0.264s (± 1.93%) 0.261s (± 2.21%) ~ 0.244s 0.281s p=0.388 n=20
Bind Time 0.072s (± 8.46%) 0.076s (± 6.13%) ~ 0.064s 0.096s p=0.145 n=20
Check Time 1.313s (± 0.83%) 1.301s (± 0.88%) ~ 1.268s 1.345s p=0.216 n=20
Emit Time 0.894s (± 1.08%) 0.886s (± 0.63%) ~ 0.867s 0.910s p=0.245 n=20
Total Time 2.579s (± 0.64%) 2.562s (± 0.55%) ~ 2.520s 2.613s p=0.177 n=20
arktype - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 676,875 676,875 ~ ~ ~ p=1.000 n=20
Types 937,868 937,868 ~ ~ ~ p=1.000 n=20
Memory Used 473,647k (± 0.01%) 473,667k (± 0.01%) ~ 473,436k 473,893k p=0.409 n=20
Memory Allocs 11,788,360 (± 0.01%) 11,787,901 (± 0.01%) ~ 11,785,886 11,792,145 p=0.869 n=20
Config Time 0.003s (± 4.95%) 0.003s ~ ~ ~ p=0.346 n=20
Parse Time 0.084s (± 2.70%) 0.084s (± 3.24%) ~ 0.074s 0.096s p=0.695 n=20
Bind Time 0.025s (± 9.87%) 0.025s (±10.95%) ~ 0.021s 0.040s p=0.518 n=20
Check Time 1.742s (± 0.36%) 1.737s (± 0.52%) ~ 1.704s 1.792s p=0.258 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 1.906s (± 0.44%) 1.900s (± 0.39%) ~ 1.879s 1.942s p=0.349 n=20
class-transformer - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 45,379 45,379 ~ ~ ~ p=1.000 n=20
Types 7,571 7,571 ~ ~ ~ p=1.000 n=20
Memory Used 27,699k (± 0.03%) 27,701k (± 0.02%) ~ 27,677k 27,727k p=0.515 n=20
Memory Allocs 231,582 (± 0.04%) 231,789 (± 0.10%) ~ 231,357 233,785 p=0.070 n=20
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=20
Parse Time 0.020s (± 2.39%) 0.020s (± 2.35%) ~ 0.019s 0.022s p=0.689 n=20
Bind Time 0.007s (±12.18%) 0.006s (±13.16%) ~ 0.005s 0.010s p=0.198 n=20
Check Time 0.018s (± 6.93%) 0.018s (± 7.04%) ~ 0.015s 0.022s p=0.712 n=20
Emit Time 0.018s (± 5.79%) 0.018s (± 7.54%) ~ 0.015s 0.023s p=0.950 n=20
Total Time 0.065s (± 1.08%) 0.065s (± 1.30%) ~ 0.062s 0.069s p=0.587 n=20
effect - native
Errors 4 4 ~ ~ ~ p=1.000 n=20
Symbols 1,233,598 1,233,598 ~ ~ ~ p=1.000 n=20
Types 890,152 890,152 ~ ~ ~ p=1.000 n=20
Memory Used 938,466k (± 0.01%) 938,473k (± 0.01%) ~ 938,001k 939,092k p=0.985 n=20
Memory Allocs 11,683,011 (± 0.07%) 11,680,812 (± 0.03%) ~ 11,673,737 11,709,602 p=0.841 n=20
Config Time 0.006s 0.006s ~ ~ ~ p=1.000 n=20
Parse Time 0.332s (± 1.38%) 0.330s (± 1.51%) ~ 0.310s 0.353s p=0.953 n=20
Bind Time 0.000s 0.000s (±208.60%) ~ 0.000s 0.001s p=1.000 n=20
Check Time 1.793s (± 0.49%) 1.782s (± 0.45%) ~ 1.761s 1.824s p=0.123 n=20
Emit Time 0.928s (± 3.31%) 0.947s (± 3.27%) ~ 0.818s 1.034s p=0.452 n=20
Total Time 3.220s (± 0.88%) 3.235s (± 0.88%) ~ 3.114s 3.323s p=0.430 n=20
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=20
Symbols 3,692,472 3,692,472 ~ ~ ~ p=1.000 n=20
Types 1,350,576 1,350,576 ~ ~ ~ p=1.000 n=20
Memory Used 1,652,622k (± 0.09%) 1,653,257k (± 0.09%) ~ 1,649,289k 1,659,604k p=0.571 n=20
Memory Allocs 24,331,367 (± 0.05%) 24,328,779 (± 0.05%) ~ 24,296,232 24,371,140 p=0.869 n=20
Config Time 0.016s (± 1.40%) 0.016s (± 1.08%) ~ 0.015s 0.016s p=0.930 n=20
Parse Time 0.548s (± 3.00%) 0.552s (± 1.76%) ~ 0.510s 0.589s p=0.541 n=20
Bind Time 0.002s (±18.52%) 0.002s (± 8.70%) ~ 0.002s 0.003s p=0.285 n=20
Check Time 5.473s (± 0.44%) 5.467s (± 0.24%) ~ 5.391s 5.511s p=0.984 n=20
Emit Time 0.604s (± 5.73%) 0.593s (± 4.67%) ~ 0.495s 0.733s p=0.571 n=20
Total Time 7.576s (± 0.86%) 7.585s (± 0.60%) ~ 7.361s 7.696s p=0.812 n=20
sentry - native
Errors 1 1 ~ ~ ~ p=1.000 n=20
Symbols 4,781,856 4,781,856 ~ ~ ~ p=1.000 n=20
Types 2,590,628 2,590,628 ~ ~ ~ p=1.000 n=20
Memory Used 2,791,685k (± 0.03%) 2,791,440k (± 0.03%) ~ 2,788,825k 2,795,156k p=0.546 n=20
Memory Allocs 73,813,740 (± 0.10%) 73,807,328 (± 0.10%) ~ 73,516,905 74,281,628 p=0.812 n=20
Config Time 0.044s (± 0.81%) 0.044s (± 0.91%) ~ 0.043s 0.046s p=0.440 n=20
Parse Time 0.967s (± 2.05%) 1.001s (± 2.69%) +0.032s (+ 3.29%) 0.917s 1.164s p=0.019 n=20
Bind Time 0.348s (±11.22%) 0.284s (± 9.39%) 🟩-0.064s (-18.43%) 0.233s 0.447s p=0.005 n=20
Check Time 13.154s (± 0.49%) 13.211s (± 0.39%) ~ 13.006s 13.347s p=0.216 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 14.584s (± 0.42%) 14.607s (± 0.37%) ~ 14.422s 14.859s p=0.729 n=20
social-app - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 1,839,004 1,839,004 ~ ~ ~ p=1.000 n=20
Types 1,147,065 1,147,065 ~ ~ ~ p=1.000 n=20
Memory Used 938,415k (± 0.01%) 938,395k (± 0.01%) ~ 937,796k 939,098k p=0.648 n=20
Memory Allocs 13,238,870 (± 0.09%) 13,249,860 (± 0.12%) ~ 13,209,078 13,318,881 p=0.133 n=20
Config Time 0.011s 0.011s ~ ~ ~ p=1.000 n=20
Parse Time 0.283s (± 1.85%) 0.281s (± 1.59%) ~ 0.265s 0.303s p=0.330 n=20
Bind Time 0.077s (±13.45%) 0.071s (± 9.98%) ~ 0.061s 0.119s p=0.360 n=20
Check Time 2.463s (± 0.60%) 2.475s (± 0.48%) ~ 2.415s 2.510s p=0.105 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 2.854s (± 0.30%) 2.857s (± 0.32%) ~ 2.821s 2.902s p=0.784 n=20
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 1,182,507 1,182,507 ~ ~ ~ p=1.000 n=20
Types 435,504 435,504 ~ ~ ~ p=1.000 n=20
Memory Used 1,166,172k (± 0.34%) 1,163,979k (± 0.31%) ~ 1,148,351k 1,183,307k p=0.475 n=20
Memory Allocs 39,920,982 (± 0.10%) 39,922,033 (± 0.05%) ~ 39,839,002 39,998,041 p=1.000 n=20
Config Time 0.005s (± 7.13%) 0.005s (±16.43%) ~ 0.003s 0.012s p=0.341 n=20
Parse Time 0.288s (± 1.87%) 0.289s (± 1.27%) ~ 0.272s 0.305s p=0.701 n=20
Bind Time 0.000s (±208.60%) 0.000s ~ ~ ~ p=1.000 n=20
Check Time 1.716s (± 0.39%) 1.717s (± 0.40%) ~ 1.696s 1.757s p=0.985 n=20
Emit Time 0.292s (± 2.00%) 0.296s (± 1.75%) ~ 0.279s 0.317s p=0.113 n=20
Total Time 20.394s (± 0.31%) 20.417s (± 0.40%) ~ 20.040s 20.745s p=0.841 n=20
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 262,139 262,139 ~ ~ ~ p=1.000 n=20
Types 195,077 195,077 ~ ~ ~ p=1.000 n=20
Memory Used 221,436k (± 0.02%) 221,383k (± 0.02%) ~ 221,111k 221,553k p=0.060 n=20
Memory Allocs 1,885,150 (± 0.02%) 1,885,713 (± 0.02%) +671 (+ 0.04%) 1,884,028 1,886,883 p=0.006 n=20
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=20
Parse Time 0.106s (± 3.50%) 0.103s (± 3.02%) ~ 0.095s 0.117s p=0.113 n=20
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Check Time 0.836s (± 0.34%) 0.835s (± 0.35%) ~ 0.821s 0.845s p=0.165 n=20
Emit Time 0.090s (± 3.31%) 0.088s (± 3.72%) ~ 0.079s 0.105s p=0.388 n=20
Total Time 1.077s (± 0.45%) 1.072s (± 0.39%) ~ 1.055s 1.088s p=0.169 n=20
t3code-server - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 4,345,111 4,345,111 ~ ~ ~ p=1.000 n=20
Types 3,039,273 3,039,273 ~ ~ ~ p=1.000 n=20
Memory Used 2,393,191k (± 0.02%) 2,392,858k (± 0.03%) ~ 2,390,909k 2,397,096k p=0.368 n=20
Memory Allocs 36,893,931 (± 0.04%) 36,929,107 (± 0.04%) +36,415 (+ 0.10%) 36,893,798 37,020,064 p=0.004 n=20
Config Time 0.005s 0.005s (± 2.93%) ~ 0.004s 0.005s p=0.346 n=20
Parse Time 0.461s (± 2.24%) 0.473s (± 2.32%) ~ 0.416s 0.512s p=0.133 n=20
Bind Time 0.141s (±12.56%) 0.132s (±11.62%) ~ 0.116s 0.228s p=0.481 n=20
Check Time 10.338s (± 0.34%) 10.316s (± 0.24%) ~ 10.229s 10.421s p=0.430 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 10.958s (± 0.40%) 10.939s (± 0.30%) ~ 10.831s 11.084s p=0.756 n=20
tanstack-router - native
Errors 3 3 ~ ~ ~ p=1.000 n=20
Symbols 567,390 567,390 ~ ~ ~ p=1.000 n=20
Types 395,720 395,720 ~ ~ ~ p=1.000 n=20
Memory Used 311,012k (± 0.01%) 310,940k (± 0.01%) -75k (- 0.02%) 310,737k 311,104k p=0.004 n=20
Memory Allocs 3,964,205 (± 0.03%) 3,969,174 (± 0.14%) +2,741 (+ 0.07%) 3,963,407 4,019,299 p=0.001 n=20
Config Time 0.001s (±16.87%) 0.002s (±15.36%) ~ 0.001s 0.002s p=0.178 n=20
Parse Time 0.068s (± 4.63%) 0.066s (± 3.09%) ~ 0.060s 0.075s p=0.393 n=20
Bind Time 0.023s (±10.64%) 0.022s (±13.26%) ~ 0.018s 0.038s p=0.623 n=20
Check Time 0.864s (± 0.73%) 0.862s (± 0.60%) ~ 0.840s 0.877s p=0.794 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 0.960s (± 0.71%) 0.956s (± 0.49%) ~ 0.935s 0.977s p=0.287 n=20
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=20
Symbols 230,307 230,307 ~ ~ ~ p=1.000 n=20
Types 180,514 180,514 ~ ~ ~ p=1.000 n=20
Memory Used 190,409k (± 0.01%) 190,397k (± 0.02%) ~ 190,275k 190,516k p=0.475 n=20
Memory Allocs 1,284,093 (± 0.01%) 1,284,529 (± 0.01%) +404 (+ 0.03%) 1,283,950 1,285,499 p=0.003 n=20
Config Time 0.001s (±31.33%) 0.001s (±35.12%) ~ 0.000s 0.001s p=1.000 n=20
Parse Time 0.090s (± 3.52%) 0.090s (± 3.13%) ~ 0.076s 0.097s p=0.955 n=20
Bind Time 0.036s (± 7.28%) 0.036s (± 7.33%) ~ 0.028s 0.049s p=0.891 n=20
Check Time 0.646s (± 0.75%) 0.643s (± 0.73%) ~ 0.627s 0.658s p=0.360 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 0.786s (± 0.65%) 0.784s (± 0.51%) ~ 0.763s 0.798s p=0.430 n=20
vscode - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 8,789,211 8,789,211 ~ ~ ~ p=1.000 n=20
Types 5,100,037 5,100,037 ~ ~ ~ p=1.000 n=20
Memory Used 5,859,895k (± 0.02%) 5,858,361k (± 0.01%) -1,754k (- 0.03%) 5,856,019k 5,861,790k p=0.040 n=20
Memory Allocs 65,071,420 (± 0.02%) 65,165,628 (± 0.00%) +98,876 (+ 0.15%) 65,154,547 65,178,380 p=0.000 n=20
Config Time 0.048s (± 0.75%) 0.047s (± 0.50%) ~ 0.047s 0.048s p=1.000 n=20
Parse Time 1.851s (± 1.43%) 1.823s (± 1.44%) ~ 1.716s 1.938s p=0.143 n=20
Bind Time 0.550s (± 5.76%) 0.580s (± 6.88%) ~ 0.496s 0.809s p=0.108 n=20
Check Time 13.944s (± 0.33%) 13.848s (± 0.56%) -0.091s (- 0.65%) 13.389s 14.075s p=0.027 n=20
Emit Time 4.420s (± 5.84%) 4.608s (± 6.49%) ~ 3.939s 5.784s p=0.349 n=20
Total Time 20.882s (± 1.14%) 20.981s (± 1.30%) ~ 20.389s 21.785s p=0.571 n=20
webpack - native
Errors 685 685 ~ ~ ~ p=1.000 n=20
Symbols 936,876 936,876 ~ ~ ~ p=1.000 n=20
Types 643,195 643,195 ~ ~ ~ p=1.000 n=20
Memory Used 759,822k (± 0.01%) 759,767k (± 0.01%) ~ 759,417k 760,176k p=0.475 n=20
Memory Allocs 6,522,440 (± 0.12%) 6,518,523 (± 0.08%) ~ 6,506,219 6,539,084 p=0.261 n=20
Config Time 0.008s (± 2.10%) 0.008s (± 2.33%) ~ 0.008s 0.009s p=0.193 n=20
Parse Time 0.315s (± 2.47%) 0.317s (± 2.60%) ~ 0.275s 0.347s p=0.514 n=20
Bind Time 0.090s (±11.96%) 0.098s (±13.15%) ~ 0.071s 0.141s p=0.522 n=20
Check Time 3.523s (± 0.28%) 3.523s (± 0.25%) ~ 3.492s 3.568s p=0.956 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 3.981s (± 0.38%) 3.991s (± 0.42%) ~ 3.927s 4.050s p=0.430 n=20
xstate-main - native
Errors 1 1 ~ ~ ~ p=1.000 n=20
Symbols 4,335,650 4,335,650 ~ ~ ~ p=1.000 n=20
Types 4,459,425 4,459,425 ~ ~ ~ p=1.000 n=20
Memory Used 2,396,882k (± 0.01%) 2,396,914k (± 0.01%) ~ 2,396,043k 2,397,610k p=0.812 n=20
Memory Allocs 48,048,588 (± 0.01%) 48,057,113 (± 0.01%) +7,911 (+ 0.02%) 48,042,534 48,105,673 p=0.030 n=20
Config Time 0.005s (± 3.52%) 0.005s (± 3.99%) ~ 0.004s 0.005s p=0.783 n=20
Parse Time 0.252s (± 1.72%) 0.255s (± 1.53%) ~ 0.237s 0.267s p=0.196 n=20
Bind Time 0.076s (± 9.63%) 0.073s (±10.03%) ~ 0.065s 0.120s p=0.643 n=20
Check Time 10.243s (± 0.33%) 10.223s (± 0.42%) ~ 9.979s 10.306s p=0.498 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 10.586s (± 0.32%) 10.565s (± 0.40%) ~ 10.323s 10.649s p=0.571 n=20
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • arktype - native
  • class-transformer - native
  • effect - native
  • mui-docs - native
  • sentry - native
  • social-app - native
  • strada-build-src - native
  • strada-compiler - native
  • t3code-server - native
  • tanstack-router - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 20
Baseline baseline 20

lsp

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
CompilerLSP - native
Req 1 - updateOpen 11ms (± 8.06%) 11ms (± 6.69%) ~ 9ms 14ms p=0.570 n=20
Req 2 - geterr 254ms (± 0.47%) 254ms (± 0.52%) ~ 250ms 260ms p=0.896 n=20
Req 3 - references 47ms (± 0.80%) 46ms (± 0.84%) ~ 45ms 47ms p=0.207 n=20
Req 4 - navto 19ms (± 1.73%) 19ms (± 1.92%) ~ 18ms 21ms p=0.057 n=20
Req 5 - completionInfo count 1,525 1,525 ~ ~ ~ p=1.000 n=20
Req 5 - completionInfo 18ms (± 2.15%) 18ms (± 2.67%) ~ 17ms 21ms p=0.681 n=20
Compiler-UnionsLSP - native
Req 1 - updateOpen 11ms (± 7.84%) 11ms (± 8.81%) ~ 9ms 15ms p=0.442 n=20
Req 2 - geterr 445ms (± 0.33%) 447ms (± 0.39%) ~ 441ms 454ms p=0.384 n=20
Req 3 - references 41ms (± 1.61%) 41ms (± 1.64%) ~ 38ms 44ms p=0.195 n=20
Req 4 - navto 18ms (± 1.24%) 18ms (± 1.14%) ~ 18ms 19ms p=0.057 n=20
Req 5 - completionInfo count 1,363 1,363 ~ ~ ~ p=1.000 n=20
Req 5 - completionInfo 20ms (± 4.05%) 20ms (± 4.60%) ~ 18ms 24ms p=0.334 n=20
xstate-main-1-LSP - native
⚠️ Failed failed failed
System info unknown
Hosts
  • native
Scenarios
  • CompilerLSP - native
  • Compiler-UnionsLSP - native
  • xstate-main-1-LSP - native
Benchmark Name Iterations
Current pr 20
Baseline baseline 20

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
lsp-startup - native
⚠️ Failed failed failed
tsgo-startup - native
⚠️ Failed failed failed
System info unknown
Hosts
  • native
Scenarios
  • lsp-startup - native
  • tsgo-startup - native
Benchmark Name Iterations
Current pr 20
Baseline baseline 20

Developer Information:

Download Benchmarks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Domain: Performance Performance related For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

IntelliSense slow down with large json file

4 participants