Problem: Platformio using all CPUs (PIO IDE 1.8.3)

Hi,

I am using PIO IDE 1.8.3 with VSCode (Ubuntu 18.04) and every time I do a Build, Upload or a simple Serial Monitor, before doing the actual task (which takes the normal time), first all my CPU’s start going at almost 100%. I did a htop when this happened and the process is “rg”, which several processes running in parallel. I tried (from another post) disabling the GPU, with the same result. This 100% usage (actually around 800%) goes like for 5-10 secs and then it starts doing the actual task (build, etc). I attach two images showing the htop results (with and without GPU). This happens with any file I try to compile (I use it to test a esp32).

Any ideas? Thank you in advace.

(without GPU)

(with GPU enabled) (I couldn’t upload the second file… since I am a new user :()

It’s related to GitHub - microsoft/vscode-ripgrep: For consuming the ripgrep binary from microsoft/ripgrep-prebuilt in a Node project … which powers the text search ability of VSCode… can’t you what’s causing that behaviour though… :frowning:

edit: It seems it is most likely related to an extension, as VSCode is not supposed to trigger rg on it’s own bat.

Maybe try the "search.useRipgrep": false option in the VSCode preferences to see if that stops it??

Hi @pfeerick,

Thank you for your suggestion. I added this line:
"search.useRipgrep": false
at the end of this configuration file (I am telling this just to make sure I am doing the right thing) $HOME/.config/Code/User/settings.json and, althought the first try it when a little crazy again, curiously after that it worked the way one expects. I will keep working and if I have any news, I will post them.

Thanks again!

1 Like

Great! :slight_smile:

It seems the underlying issue is something to do with text searching… with an extension triggering the files to be indexed. To identify what is doing it, you’d need to turn Ripgrep back on, let it run again, and use the Help -> Open Process Explorer tool to see what paramaters are being passed to rg in order to work out what its been told to search for… then you might be able to work out what extension is causing it. i.e. a bunch of *.php parameters would suggest a PHP extension, etc.

Or just leave it turned off if you’re not bothered about the multi-file text search / file search VSCode stuff. :wink:

Hi again,

Thank you for the follow up. For the moment I think I will leave it off, since I don’t use the multi-file text search for the moment.

Thanks again!

1 Like