Skip to content

Performance regression with --incremental between native-preview-0.20251211.1 and 0.20251209.1 #2341

@gggdomi

Description

@gggdomi

Hi,

Apologies for the absence of repro. Hopefully with the small time range it will still be helpful to pinpoint a potential regression.

We noticed today that tsgo was noticeably slower on our codebase.
We found that the difference was :

  • between versions typescriptteam.native-preview-0.20251209.1 (fast) and typescriptteam.native-preview-0.20251211.1 (slow)
  • only when using --incremental, and only on first run (ie. no pre-existing .tsbuildinfo)

We reproduced multiple times, on multiple machines, but on a single codebase.

Metric 0.20251209.1 0.20251211.1 Notes
Check time (incremental, first run) 6.642s 19.916s Large slowdown
CPU (incremental, first run) 419% CPU 186% CPU Multi-threading issue?
Check time (incremental, next runs) <0.01s <0.01s No difference
Check time (incremental = false) ~6.5s ~6.5s No difference

Detailed logs

time and extendedDiagnostics logs of first --incremental run, with each version.
(there was no meaningful differences/logs for other configurations)

# ✅ version 0.20251209.1 is fast
➜ rm -f .tsconfig.tsbuildinfo
➜ time /Users/gui/.vscode/extensions/typescriptteam.native-preview-0.20251209.1-darwin-arm64/lib/tsgo --noEmit --project tsconfig.json --incremental  --extendedDiagnostics
Files:                    9918
Lines:                 1489421
Identifiers:           1767364
Symbols:               8496581
Types:                 2938919
Instantiations:       10101417
Memory used:          5176707K
Memory allocs:        70927013
Config time:            0.094s
BuildInfo read time:    0.000s
Parse time:             0.718s
Bind time:              0.000s
Check time:             6.642s
Emit time:              0.386s
Changes compute time:   0.168s
Total time:             8.011s

time:  41.01s user 2.36s system 419% cpu 10.350 total
# ❌ version 0.20251211.1 is slow
➜ rm -f .tsconfig.tsbuildinfo
➜ time /Users/gui/.vscode/extensions/typescriptteam.native-preview-0.20251211.1-darwin-arm64/lib/tsgo --noEmit --project tsconfig.json --incremental  --extendedDiagnostics
Files:                    9918
Lines:                 1489421
Identifiers:           1767364
Symbols:               8496581
Types:                 2938919
Instantiations:       10101417
Memory used:          5173748K
Memory allocs:        71095193
Config time:            0.102s
BuildInfo read time:    0.000s
Parse time:             0.715s
Bind time:              0.001s
Check time:            19.916s
Emit time:              0.447s
Changes compute time:   0.269s
Total time:            21.456s

time:  43.04s user 2.15s system 186% cpu 24.246 total

Metadata

Metadata

Assignees

No one assigned

    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