Problem: Many rg
commands started by vscode consume 99% of CPUs.
Cause:
- There are four symlink folders with over 700k files in them, which are usually ignored in
/project-root/.gitginore
. - The
--no-ignore-parent --follow
flags are being used, which causesrg
to search in these folders.
Solution 1:
- Add the folders to
/project-root/project-1/subproject-a/.gitignore
again. - The
rg
commands should no longer consume so much CPU resource.
Solution 2:
- Disable the Auto Import extension in vscode.
- This may resolve the issue for some users.
Code:
# In /project-root/project-1/subproject-a/.gitignore
**/symlink-folder-1/*
**/symlink-folder-2/*
**/symlink-folder-3/*
**/symlink-folder-4/*