Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mac] Runaway CPU usage from 'rg' after opening home directory #51757

Closed
benjibee opened this issue Jun 13, 2018 · 3 comments
Closed

[Mac] Runaway CPU usage from 'rg' after opening home directory #51757

benjibee opened this issue Jun 13, 2018 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster perf search Search widget and operation issues

Comments

@benjibee
Copy link

I opened by home directory ~/ in VSCode to edit a few bash / git config files and noticed my fans were spinning up and my laptop getting hot. After 10 or so minutes I restarted, opened VSCode and left it running in the background while I checked my email, only to notice the fans were spinning up again.

Activity Monitor shows the following usage:
screen shot 2018-06-13 at 2 34 50 pm

This process, rg, is owned by VSCode and some searching shows it's for indexing. I ran sudo opensnoop -n rg to see what it was up to, noticed it was indexing cache, my photos, all sorts of random stuff, then realized it was indexing my whole user directory / library and this is what was killing my CPU.

  • VSCode Version: 1.24.0
  • OS Version: 10.13.5 (17F77)

Steps to Reproduce:

  1. Open Visual Studio Code
  2. Select FIle > Open…
  3. Select user's home folder

Does this issue occur when all extensions are disabled?: Yes

@RMacfarlane RMacfarlane added perf new release search Search widget and operation issues and removed new release labels Jun 13, 2018
@roblourens
Copy link
Member

This is most likely from an extension looking for a certain filetype. Can you confirm this by getting the arguments for those rg processes? Either from the process viewer in vscode or ps.

#34711

@roblourens roblourens added the info-needed Issue requires more information from poster label Jun 13, 2018
@vscodebot vscodebot bot removed the new release label Jun 13, 2018
@benjibee
Copy link
Author

benjibee commented Jun 14, 2018

This is what running ps on the pid of one of the instances shows:

rg --files --hidden --case-sensitive -g **/*.php --no-ignore --follow --quiet -- .

And running code --list-extensions shows the following:

GrapeCity.gc-excelviewer
Shan.code-settings-sync
cazoobi.solis
anthonydiametrix.ACF-Snippet
azaugg.vscode-cfengine
bradgashler.htmltagwrap
christian-kohler.path-intellisense
d4nuu8.language-kuka-krl
deerawan.vscode-dash
ecmel.vscode-html-css
esbenp.prettier-vscode
felixfbecker.php-intellisense
mikestead.dotenv
mrmlnc.vscode-apache
mrmlnc.vscode-scss
ms-python.python
ms-vscode.cpptools
nikitaKunevich.snippet-creator
onecentlin.laravel-blade
patbenatar.advanced-new-file
robinbentley.sass-indented
sachittandukar.laravel-5-snippets
sdras.night-owl
shinnn.stylelint
sleistner.vscode-fileutils
smlombardi.slime
vsciot-vscode.vscode-arduino
whatwedo.twig
wordpresstoolbox.wordpress-toolbox

If I disable them all, the errant processes stop after 1-2 minutes. If I re-enable PHP IntelliSense then the errant rg processes return quickly.

While I can take this issue over to the extension developer, I don't think a buggy extension should have the free reign to bog-down my system like this.

@roblourens
Copy link
Member

Ok, yes this is exactly what #34711 is for

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster perf search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

3 participants