我在一个非常大的 github 仓库中工作,说它的结构就像
project-root
├── project-1
│ ├── subproject-a
│ └── subproject-others
└── project-2
├── subproject-b
└── subproject-others
有很多项目,每个项目都包含很多子项目。我只是在处理其中一个子项目(例如subproject-a
)。当我在子项目(它是一个 python 子项目)中打开 vscode 时,我注意到它启动了许多rg
如下所示的命令,并且我的 CPU 使用率超过 99%。我想知道这些 rg 命令是关于什么的?他们只是在子项目中搜索东西,还是在包含数万个文件的整个 git 存储库中搜索?他们为什么要消耗这么多资源?请问我怎样才能避免这种情况?
/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --files --hidden --case-sensitive -g **/*.go/** -g **/*.go -g !**/.git -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/.classpath -g !**/.factorypath -g !**/.project -g !**/.settings -g !**/node_modules -g !**/bower_components -g !**/*.code-search --no-ignore-parent --follow --quiet --no-config --no-ignore-global