Hacker News new | ask | show | jobs
by marshughes 479 days ago
First of all, you can try to update VS Code to the latest version. Sometimes, memory problems may be caused by bugs in older versions, and new versions often fix these issues. You can also check the installed VS Code extensions. Some extensions may have memory leaks. You can try to disable some non - essential extensions and observe whether the memory usage improves. In addition, regarding the WSL memory settings, you can further optimize the configuration in the .wslconfig file, for example, adjust parameters like pageReporting to better manage memory allocation. For alternative editors, you can consider IntelliJ IDEA. It has good support for a variety of programming languages and has specific configuration options for WSL, which can run well in the WSL environment. Although it is an IDE, if you are used to the rich features of VS Code, the feature set of IDEA may also better meet your needs. Did you encounter any difficulties when trying the above optimization methods for VS Code?
1 comments

I don't have a lot of extensions actually, my VS Code is pretty much vanilla.

I'm on the latest version (1.97.2).

I can try the other memory settings indeed, but I think the culprit is the builtin file watcher. I've stumbled across some similar issues on Github, open for 5 years without a solution :(

Isn't IntelliJ IDEA for Java/Kotlin? I have a project which is cross-languages: Go+Rust on the backend, Typescript/React on the frontend, Hurl and Python (Robot Framework) for the test suite. And I'd rather not have one IDE per language (which is IIRC what Jetbrains do).

The underlying spirit of marshughes comment sounds on the right track, though - something changed on your system. Maybe it was VS Code, maybe it was something else, but if this is a recent change, you should troubleshoot what actually changed. If it really is VS code, then yes - find a new editor. But I'm not seeing much about what troubleshooting you've done?

Maybe you've already done this, but if I were you, I'd take note of everything that has been installed and updated in the last month. Walk back installs and updates until your problem goes away, and then you'd know exactly what is causing the problem behavior.