Menu

Post image 1
Post image 2
1 / 2
0

TypeScript at Scale: Why Your tsc Takes 90 Seconds and How to Fix It

DEV Community·Alex Cloudstar·25 days ago
#Wguso9Lh
Reading 0:00
15s threshold

The TypeScript codebase I inherited last year had a clean build time of 94 seconds. Incremental builds were 12 seconds on a good day. The editor would freeze for two or three seconds every time you hovered over a Zod schema. Nobody wrote new code without first opening their second monitor to scroll Twitter while the language server caught up. It is now 11 seconds for a clean build, sub-second incremental, and the editor stays responsive. We did not move to Project Corsa. We did not switch to Bun. We did not split the repo. We deleted three patterns that were generating millions of redundant type instantiations and tightened a few tsconfig settings. The work took about a week. Most TypeScript performance problems at scale are not "TypeScript is slow." They are "we are asking TypeScript to do something quadratic and it is doing it." This post is the diagnostic playbook for figuring out which thing your codebase is doing. The First Question: Where Is the Time Going Before tuning anything, get real numbers.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More