Skip to content

Get incremental mode closer to Strada#4557

Draft
jakebailey wants to merge 3 commits into
mainfrom
jabaile/tsgo-standalone-repro-slowdown
Draft

Get incremental mode closer to Strada#4557
jakebailey wants to merge 3 commits into
mainfrom
jabaile/tsgo-standalone-repro-slowdown

Conversation

@jakebailey

Copy link
Copy Markdown
Member

This was copilot produced from an internal repro. massive baseline change, but:

  • Clean  --noEmit --incremental  builds now keep source  fileInfos  compact when signature equals version, like  tsc .
  • During affected-file processing, tsgo tracks  oldSignatures  while shape signatures are being updated, so buildinfo serialization can represent the same in-progress state Strada does.
  • Forced declaration-signature emit work triggered from semantic diagnostics is now accounted as Emit time, not Check time, matching  tsc ’s diagnostic accounting.
  • The original “incremental check is much slower than clean check” symptom is mostly an accounting mismatch: the expensive work still happens on the first affected incremental run in both compilers, but Strada reports it under emit/print rather than check.

Store declaration-shape signatures in noEmit incremental buildinfo so a subsequent comment-only edit in a widely imported module does not invalidate the importer cone as an API-shape change.

On the standalone repro, the 400-spoke isolatedModules:false incremental Check time drops from about 0.047s to 0.001s; the 4000-spoke scaled case drops from 0.508s to 0.002s.
Only precompute declaration-shape signatures for noEmit incremental builds when isolatedModules is disabled and the file can affect multiple dependents or global scope.

This keeps clean buildinfo closer to tsc for leaf files and isolatedModules projects while preserving the hub-fanout improvement. The 400-spoke repro keeps isolatedModules:false incremental Check time around 0.001s, and isolatedModules:true clean buildinfo stays compact.
Track old signatures while affected-file processing updates shape signatures, and serialize those old signatures while buildinfo reflects an in-progress state. This mirrors Strada's oldSignatures behavior instead of eagerly precomputing noEmit signatures.

Also account forced declaration-signature emits as emit work in extended diagnostics, matching where Strada reports the same work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant