Language Service out-of-memory troubleshooting
For the sake of transparency, WebStorm nowadays relies on TypeScript, Angular, Vue, Astro, and other framework-specific Language Services. Although WebStorm strives at providing slick integration with these Language Services, performance problems still may often be induced by them rather than by the IDE itself.
Out-of-memory errors in Language Services can disrupt your development workflow, breaking such essential features as autocompletion, code analysis, and error highlighting.
An out-of-memory error occurs when a Language Service exceeds its allocated memory limit and can no longer handle the workload. This typically happens for the following reasons:
The project you are currently working with contains numerous files and dependencies.
The Maximum Memory limit specified in the IDE settings is not sufficient for a Language Service.
Troubleshooting
Increase Memory Allocation
Open settings by pressing Ctrl+Alt+S and navigate to
.Select the Set memory limit option and specify the maximum memory size to use by Language Services.
Increase the limit gradually, for example, from 4GB to 6GB and then to 8GB. Monitor the improvements.
Limit Project Scope
Large projects with excessive files or dependencies can overload a Language Service. To reduce the load in large codebases, follow the recommendations from the performance guide provided by the TypeScript team, especially the sections Using Project References and Configuring tsconfig.json or jsconfig.json.
Upgrade or downgrade
New versions of a Language Service often include performance optimizations. Try updating to the latest version to resolve memory issues.
If an issue appeared after an update, consider downgrading to the previous version to confirm whether the problem was introduced by the update.
File an issue with the Language Service team.
Submit an issue
If the problem persists, submit an issue in the WebStorm issue tracker and attach your project to it. This will help us reproduce and investigate the issue more efficiently.