News for hackers. Stuff that matters.
Re:VSCode memory leak issue marked “out-of-scope” by brundolf on Tuesday November 24, 2020 @12:06AM (#25195460)
> the Code Helper uses massive resources and about once every couple days ends up spinning out of control causing the CPU to cook and the fan to spin constantly until it's restarted

What language are you working in?

VSCode's user experience varies widely between languages/ecosystems. Its IDE features are driven by language servers, and most are written by third-parties, and some of them are great and some of them are terrible. TypeScript and Rust (if you're using rust-analyzer) are stellar. Python is okay. Flow (an alternate JavaScript type system) was terrible last time I checked, spinning the CPU and freezing up like you describe. Language servers run as a separate process (Code Helper, I believe) and can be as inefficient/leaky/resource-hungry as they want to be.

Re:VSCode memory leak issue marked “out-of-scope” by ogre_codes on Tuesday November 24, 2020 @12:18AM (#25195530)
We're straight TypeScript/ React. We have a pretty large codebase though which no doubt contributes to the issue.

The thing is, VIM uses the same language server and (so far anyhow) doesn't melt down. It seems like the issue is in the Code Helper process itself.

Re:VSCode memory leak issue marked “out-of-scope” by brundolf on Tuesday November 24, 2020 @12:28AM (#25195580)
I have heard of people running into issues with the file-search indexer taking a long time on extraordinarily large projects. The largest project I've used it on was in the thousands of files (excluding node_modules) and didn't have any issues. But I know there are much larger projects out there, so I can't speak to those.
Re:VSCode memory leak issue marked “out-of-scope” by ogre_codes on Tuesday November 24, 2020 @12:40AM (#25195639)
We're approaching 3000 source files in our repo so I'm not sure. That is the issue.
Re:VSCode memory leak issue marked “out-of-scope” by brundolf on Tuesday November 24, 2020 @12:43AM (#25195660)
Here's a question: are you using git, and is node_modules ignored?

I ask because I think VSCode (by default) leans on the gitignore to decide which files to index. If it's indexing node_modules for whatever reason, that could create some serious overhead.

https://www.reddit.com/r/vscode/comments/fpfnle/is_there_a_w...

Re:VSCode memory leak issue marked “out-of-scope” by ogre_codes on Tuesday November 24, 2020 @01:05AM (#25195767)
node_modules is in our .gitignore.

I'm not sure I was super clear above, but I'm not too worried about fixing this. Now that I have a good VIM configuration I just don't feel the urge to go back.

Re:VSCode memory leak issue marked “out-of-scope” by brundolf on Tuesday November 24, 2020 @01:16AM (#25195829)
That's fair! Cheers
Re:VSCode memory leak issue marked “out-of-scope” by ogre_codes on Tuesday November 24, 2020 @01:32AM (#25195900)
Also, thanks for being rad! I do appreciate the suggestions!
Re:VSCode memory leak issue marked “out-of-scope” by therealdrag0 on Tuesday November 24, 2020 @01:34AM (#25195912)
Do you have tests and install any test plugins? I found out after a while my fan was blazing because a plug-in was auto running all the tests it could find in the background. Once I turned that off it’s been tolerable.
Re:VSCode memory leak issue marked “out-of-scope” by brylie on Tuesday November 24, 2020 @12:22AM (#25195554)
For some reason VS Code will hang and not allow interaction or input for around 25-30 seconds. I have noticed this mostly when deleting a Python file and sometimes while editing Python. How might I debug whatever is blocking the main thread to find out if it is the language server or something else?
Re:VSCode memory leak issue marked “out-of-scope” by rebornix on Tuesday November 24, 2020 @12:48PM (#25200883)
* Firstly, may I ask are you using Vim extension? * Can you please follow instructions listed here https://github.com/microsoft/vscode/wiki/Performance-Issues#... to profile the renderer process when that happens (more accurately start the profile before the hang happens and stop after). Usually extension should not block the typing so it might be something bad in the core. Once you have it captured, please file an issue

Thanks in advance for the help.

Re:VSCode memory leak issue marked “out-of-scope” by brundolf on Tuesday November 24, 2020 @12:32AM (#25195601)
That's crazy. I use it on a small-medium Python project (100-200 files) every day and have never had any performance problems whatsoever. I did use the MyPy language server at first, which would take a few seconds to update type errors because MyPy wasn't designed for IDEs. But the UI thread remained responsive during that time. Eventually I switched to the Pylance language server which doesn't do a perfect job with checks, but gives feedback instantly.

How big is your project, and how big are your files? I've had massive JSON files (100MB or so) cause some slight jank in the UI, but that's about the only example I can think of.

Re:VSCode memory leak issue marked “out-of-scope” by Fire-Dragon-DoL on Tuesday November 24, 2020 @09:33AM (#25198723)
I have the same problem, but I think it's an extension issue. On Ubuntu it happens, but with same extensions on macOS is not happening. I wish i could debug it. In my case it happens only when deleting files from the source tree