Replies: 2 comments 6 replies
-
It is not expected for the cpptools process to use a lot of memory under normal conditions. It's possible too many files/folders are getting indexed. You could try adding folders to the C_Cpp.files.exclude setting to scan less files for global symbols. If you set C_Cpp.loggingLevel to "Debug" the logging might indicate what processing is occurring that could be contributing to the memory usage. We have settings like C_Cpp.maxMemory you could try, but I don't believe that would help in your situation. |
Beta Was this translation helpful? Give feedback.
-
It's not uncommon for me to see CPPtools using in excess of 30 gig... well, not "not uncommon", it always is, and I have several C++ projects open at once, so each one is using a load on its own. I've had to set a shell job to sit in a loop sleeping and then killing it repeatedly before, when my system is struggling for memory and I need the least important thing to die. I think one of the issues for me is - without knowing how it works beyond probably a language server - I feel like it's probably trying to work like a compiler and understand the whole project. Even the python extension often underlines things that are fine and fails to underline things that aren't, so gut feel is, it just won't, it's asking too much. When C++ project builds are much more complicated it can't possibly know all the flags and include directories, dependencies, that are needed to build what I'm working on right now. And that's completely fine. I don't know if there's a setting for this, but I'd personally like it to run in much more of a stripped-back version. I don't expect it to be able to find semantic errors and add red squiggly underlines, for that I'll build and control-click on the error message, which to be honest I need in full, with a backtrace of template instantiations, to diagnose the problem anyway. I'd like to be able to hit F4 to change header to source, something that sometimes takes a minute to run and then gets totally the wrong file. If it can find some basic typos and issues between one source file and one or two of the headers it includes directly, just in the scope that it cans see in the document I'm currently typing (e.g. using -> when it's an object on the stack that's not a pointer) then great, otherwise it appears to be using a massive amount of system resources by default trying to provide all the insights a compiler could except without knowing how my compiler is set up and failing in the process. I'd prefer more textual stuff like being able to refactor a method from a header into a source file than for it to attempt to catch subtle issues and parse an entire project. And I guess for it maybe to set a limit on how hard it's gonna work trying before it give up, as that's better than crashing my system or spinning up the fans massively, cause I see several mentions of others' experiencing issues like this, so I think it makes sense to have a hard limit by default. |
Beta Was this translation helpful? Give feedback.
-
It is very bad memory use when I open android open source project with vscode
Beta Was this translation helpful? Give feedback.
All reactions