Report: High Memory Usage in Large Workspaces
Reported and helped diagnose high memory usage when opening large monorepo workspaces with multiple projects.
Report: High Memory Usage in Large Workspaces
Issue Description
VS Code was consuming excessive memory (4GB+) when opening large monorepo workspaces with more than 20 TypeScript projects. This caused performance degradation and sometimes crashes on machines with limited RAM.
Investigation
- Profiled memory usage using Chrome DevTools
- Identified that the TypeScript language server was creating separate instances for each project
- Found that file watchers were duplicating efforts across projects
- Discovered unnecessary caching of AST nodes
Reproduction Steps
- Open a monorepo with 20+ TypeScript projects
- Wait for IntelliSense to initialize
- Observe memory usage climbing above 4GB
- Notice sluggish editor performance
Impact
- Affected developers working on large codebases
- Made VS Code unusable on lower-end machines
- Caused crashes during long coding sessions
Resolution
The VS Code team implemented several optimizations:
- Shared TypeScript server instances across related projects
- Optimized file watcher strategy
- Improved AST node caching with LRU eviction
Issue Thread
#144523 - Closed as fixed on January 5, 2026
This post is licensed under CC BY 4.0 by the author.