Slow performance in incremental mode with no changes #46420
Labels
Domain: Performance
Reports of unusually slow behavior
Needs Investigation
This issue needs a team member to investigate its status.
Needs More Info
The issue still hasn't been fully clarified
Bug Report
π Search Terms
Performance
π Version & Regression Information
β― Playground Link
n/a
π» Code
n/a
π Actual behavior
I have a huge, closed-source TypeScript project (7600+ files, 2M+ lines of TypeScript).
Typechecking is slow, about 30 s even with incremental mode on. We'd like to get this faster and discovered that even with incremental mode on and with no changes in the code, TS visits and parses every single file in the project.
Here is a screenshot from the awesome perf tracing tool (from an incremental run with no changes since the previous run):
This was from typescript@next (which seems a little faster than the current release, thanks for that!). Of 28 s total, 22 s was spent in findSourceFile.
π Expected behavior
Incremental mode should cache enough information that it's not necessary to re-parse each file on the next run.
The text was updated successfully, but these errors were encountered: