Skip to content

noEmit slow on Mac M2 #1062

Open
Open
@jakebailey

Description

@jakebailey

Discussed in #1060

Originally posted by slackerzz June 5, 2025
I’ve been testing @typescript/native-preview on my MacBook M2 since its release, and it feels slower than tsc.
For instance, on the same codebase, tsc (v5.6.2) gives me:

time npx tsc -p . --noEmit --extendedDiagnostics
Files:                         3193
Lines of Library:             40862
Lines of Definitions:       1750956
Lines of TypeScript:          24634
Lines of JavaScript:            160
Lines of JSON:                   94
Lines of Other:                   0
Identifiers:                1718657
Symbols:                     953103
Types:                        14732
Instantiations:               40044
Memory used:               1399347K
Assignability cache size:      4238
Identity cache size:            151
Subtype cache size:              93
Strict subtype cache size:       44
I/O Read time:                0.65s
Parse time:                   1.67s
ResolveTypeReference time:    0.03s
ResolveModule time:           0.26s
ResolveLibrary time:          0.01s
Program time:                 2.90s
Bind time:                    1.05s
transformTime time:           0.11s
commentTime time:             0.00s
printTime time:               0.14s
Emit time:                    0.14s
Check time:                   0.19s
I/O Write time:               0.00s
Total time:                   4.27s
npx tsc -p . --noEmit --extendedDiagnostics  14,05s user 2,62s system 68% cpu 24,468 total

while withtsgo:

❯ time npx tsgo -p . --noEmit --extendedDiagnostics
Files:              3199
Lines:           1819088
Identifiers:     1720502
Symbols:         1299526
Types:            206149
Instantiations:   726088
Memory used:    1052469K
Memory allocs:  24159741
Parse time:       0.292s
Bind time:        0.044s
Check time:       0.393s
Emit time:        0.000s
Total time:       0.741s
npx tsgo -p . --noEmit --extendedDiagnostics  92,93s user 3,57s system 96% cpu 1:40,31 total

As you can see, tsc reports a total time of 4.27s but actually takes 24.4s, while tsgo reports 0.741s but takes 1 minute and 40 seconds.
What’s going on here?
I also tried the LSP (both in VS Code and Neovim), and it takes several minutes to start and respond to code changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: tsconfigRelated to tsconfig parsing, loading

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions