Skip to content

tsgo slow - too much type and type instantiation without --singleThreaded options #2454

@noelkim-prestolabs

Description

@noelkim-prestolabs

If i tried tsgo --diagnostics,

Files:                    5963
Lines:                  957886
Identifiers:            838616
Symbols:               2581005
Types:                 1587849
Instantiations:        6891764
Memory used:          2147995K
Memory allocs:        27727625
Config time:            0.129s
BuildInfo read time:    0.000s
Parse time:             0.400s
Bind time:              0.000s
Check time:            40.192s
Emit time:              0.076s
Changes compute time:   0.115s
Total time:            40.916s

and i tried with --singleThreaded,

Files:                    5963
Lines:                  957886
Identifiers:            838616
Symbols:               1544239
Types:                  679899
Instantiations:        2537315
Memory used:          1367003K
Memory allocs:        16330303
Config time:            0.132s
BuildInfo read time:    0.000s
Parse time:             2.240s
Bind time:              0.000s
Check time:            14.294s
Emit time:              0.076s
Changes compute time:   0.220s
Total time:            16.964s

and i tried with tsc --diagnostics,

Files:              5963
Lines:            957884
Identifiers:      844220
Symbols:         1501749
Types:            536783
Instantiations:  2232432
Memory used:    1993608K
I/O read:          1.26s
I/O write:         0.00s
Parse time:        4.36s
Bind time:         0.57s
Check time:       23.92s
Emit time:         0.05s
Total time:       28.90s

tsgo version: 7.0.0-dev.20260107.1
Hardware:

Hardware Overview:

  Model Name: MacBook Pro
  Model Identifier: Mac15,7
  Chip: Apple M3 Pro
  Total Number of Cores: 12 (6 performance and 6 efficiency)
  Memory: 36 GB

pprof for default tsgo

51524-cpuprofile.pb.gz

51524-memprofile.pb.gz

pprof for --singleThreaded tsgo

52264-cpuprofile.pb.gz

52264-memprofile.pb.gz

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions