Microsoft/TypeScript

Control Flow Analysis Performance Regression

Open

#62,050 创建于 2025年7月12日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)TypeScript (6,726 fork)batch import
Domain: PerformanceHelp WantedPossible Improvement

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

🔎 Search Terms

Control Flow

🕗 Version & Regression Information

⏯ Playground Link

No response

💻 Code

🙁 Actual behavior

I encountered a severe performance regression when type-checking a very large JavaScript file (~360,000 lines).

v4.9.5: Type-checking takes ~16,476ms.

v5.5.4: Type-checking time increases to ~64,196ms (4x slower).

Steps to Reproduce:

  1. Clone the attached project and run:
npm install
node checker.js
  1. Switch TypeScript versions (e.g., between v4.9.5 and v5.5.4) and re-test.

After testing, I believe this regression was introduced by PR #58013. When I revert this commit, the performance returns to v4.9.5 levels.

testLargeFile.zip

🙂 Expected behavior

The performance is the same as v4.9.5

Additional information about the issue

No response

贡献者指南