BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
82 stars 9 forks source link

cmantic cause multiple rg process executing and 100% cpu #67

Open julee opened 1 month ago

julee commented 1 month ago

Version: 1.89.1 (Universal) Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685 Date: 2024-05-07T05:14:24.611Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Darwin arm64 23.4.0

C-mantic:v0.9.0 C/C++: v1.20.5

When I open a C++ file, a bunch of rg processes are triggered, causing the CPU to go to 100%, resulting in severe sluggishness in VSCode. I identified that enabling the C-mantic extension triggers the issue by disabling extensions one by one.

Simply opening any C++ project (as simple as just needing two cpp files), opening one file, and then opening another file will cause a pair of rg processes to run the entire system CPU to 100%. Clicking on an #include statement to jump to a system header file also causes this issue.

ps aux | grep rg

julee            58501 365.6  0.0 410464720   6176   ??  R     7:08下午   0:20.03 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/exception_hack.{h,hpp,hh,hxx} -g !**/.git -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !**/.classpath -g !**/.factorypath -g !**/.history -g !**/.project -g !**/.settings -g !/{**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store,**/Thumbs.db,**/.classpath,**/.factorypath,**/.history,**/.project,**/.settings,**/node_modules,**/bower_components,**/*.code-search} --no-ignore --follow --no-config --no-ignore-global
julee            58508 348.4  0.0 410464720   6256   ??  R     7:08下午   0:16.06 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/exception_hack.{h,hpp,hh,hxx} -g !**/.git -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !**/.classpath -g !**/.factorypath -g !**/.history -g !**/.project -g !**/.settings -g !/{**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store,**/Thumbs.db,**/.classpath,**/.factorypath,**/.history,**/.project,**/.settings,**/node_modules,**/bower_components,**/*.code-search} --no-ignore --follow --no-config --no-ignore-global
julee            58505 304.7  0.0 410464720   6224   ??  R     7:08下午   0:17.22 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/exception_hack.{h,hpp,hh,hxx} -g !**/.git -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !**/.classpath -g !**/.factorypath -g !**/.history -g !**/.project -g !**/.settings -g !/{**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store,**/Thumbs.db,**/.classpath,**/.factorypath,**/.history,**/.project,**/.settings,**/node_modules,**/bower_components,**/*.code-search} --no-ignore --follow --no-config --no-ignore-global
kduske commented 1 month ago

Same problem, I ended up having to disable the extension because VSCode became unusable.

SineStriker commented 2 weeks ago

I encountered this problem too, especially when editing a source file that is not in the build system.