Iterating Faster with TypeScript 7
5 hours ago
- #Performance
- #VS Code
- #TypeScript
- VS Code has early close collaboration with TypeScript team, and now adopts TypeScript 7, a complete port in Go, which offers more than 10x faster performance.
- Adoption was incremental, reducing risk and allowing early feedback. Phases included exploration, using TypeScript 6 as a bridge, parallel use of TS 6 and 7, migration of extensions, and finally making TS 7 the default.
- Migration to TypeScript 7 involved simplifying builds by switching from webpack to esbuild and using tsgo for type checking, leading to significant performance improvements.
- Type checking time for main VS Code source reduced from 36 seconds (TS 6) to 5 seconds (TS 7), a 7x speedup. Overall build time for watch command dropped from 80 seconds to about 20 seconds, 4x faster.
- Editor language tooling performance improved, with project loading time decreasing from nearly a minute to around 10 seconds, saving significant time for developers.
- Close collaboration helped find bugs and polish TypeScript 7, resulting in a more tested release. The incremental approach demonstrated value in tackling large engineering efforts with feedback loops.