Webstorm eats all the memory with NX monorepos
I have a NX monorepo, which consists of many libraries, and turns out that if I open lets say 15 libraries, webstorm will take all my RAM and freeze the entire computer. I dont mean that I keep all the files of those libraries open, I can just open-close one file per library. I suspect that the reason is that webstorm launches separate Language Server for each library (I checked that using htop, and I see many nodejs proccesses running), which is unacceptable. It is possible to launch only one LSP client for the hole project, I have working neovim configuration which does that. Is there a setting which does that?
请先登录再写评论。
With Automatic configuration, ESLint can create multiple processes as described in https://www.jetbrains.com/help/webstorm/2023.2/eslint.html#ws_js_eslint_automatic_configuration. You can set the configuration to Manual and choose the desired ESLint package, working directory, and the 'root' configuration file.
Also, there is a registry key that allows passing arguments to the Node.js process that runs the language service:
eslint.service.node.arguments
. To modify this key please do the following:eslint.service.node.arguments
key (you can start typing the property name to navigate to it).--max_old_space_size
option there.It will limit the amount of memory allocated to the ESLint process.
We have a feature request for a possibility to limit the number of processes, please subscribe to WEB-57163 to get notified on updates.