ms-vscode.cpptools taking a ton of CPU usage

Viewed 1527

I'm working on Ubuntu and using MS Remote SSH as part of Remote Explorer through VSCode. When I installed C/C++ (ms-vscode.cpptools) extension, it takes up a ton of CPU%, typically around 95. I thought perhaps this is a one time thing, but it's constantly running at that percentage, making everything else (compiling the project) very slow.

I like the functionality of this extension, as I've used it on other machines before without issue. However I can't use it if it's staying at that level of usage. Is there any workaround for this? I've seen a few github debates, but nothing much coming from those.

1 Answers

After trying lots of solutions, only one works for me - adding files.exclude in settings file.

When adding files.exclude, the following lines will be add by default:

"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.deps": true,
"**/CVS": true,
"**/.DS_Store": true,

then I add some files/folder, which are in workspace but they have nothing to do with IntelliSense, such as "**/*.Po", folder that stores test data (lots of files...), which are always been updated when I use my application, etc.

and I also add

"/bin": true,
"/boot": true,
"/cdrom": true,
"/dev": true,
"/proc": true,
"/etc":true

, but I am not sure if those lines help.

After updating the settings file, we should Restart IntelliSense for Active File and Reset IntelliSense Database by the Command Palette.

btw, after using the above solution, I haven't encountered long-running high CPU usage for over two months.

Related