Hi,
This has been a consistent problem for me from previous versions. I'm currently in C++ version 0.16.1
I am using a windows 7 computer with vs code version 1.22.2 . The intellisense autocomplete is really slow, if I press ctrl-space it shows a "loading ... " dropdown.
It can take upto 10 seconds for autocomplete to respond.
My config has
"C_Cpp.intelliSenseEngine": "Default"
Thanks
If you can provide an example for us that we can use to reproduce the problem, we can investigate. Are you working in an open source repository? The issue shouldn't have anything to do with the total repository size. Performance is affected by many things, but the total size of the translation unit (source file + includes) is the more likely factor at play here, but we need additional information to be able to tell.
In the meantime, you can also try the less accurate IntelliSense option: "C_Cpp.intelliSenseEngine": "Tag Parser" if this is a constant problem for you, but this engine unfortunately doesn't provide auto-complete for local variables in functions.
This sounds like expected behavior to me. If you see the red flame in the bottom right it means that we're compiling the translation unit, which will take a while (typically after opening the doc). Autocomplete is fast after the red flame goes away, right?
+1
+1
@sean-mcmanus The issue is that after that red flame goes away it again comes back as soon as a new letter is typed in the file. (Even changing comments causes flame to recompute). Making the whole experience very bad.
@coder3101 We have a 3-5 second timer that goes off to re-compiler the changes/squiggles (and a 2nd one 10 seconds later as a hack to fix a bug we need to investigate). Is the red flame after editing too slow? We're aware that some projects cause our IntelliSense engine to use too much memory and is too slow to re-parse so you may be experiencing that. We intend to investigate/fix those issues in a later milestone.
We may be able to detect/avoid reparsing in certain very limited scenarios, such as edits to a line with only comment tokens to the right...not sure if would be worth the effort though, since in any situation where code element offsets are changed or new lines added we'd need to update our engine to give accurate results back.
I had intellisense come almost to a halt. Not working anymore.
Then checking c_cpp_properties.json I discovered compilerPath set to "gcc" , with intelliSenseMode set to Clang.
I removed the compiler path and everything is fine now.
I am working on a project (CMake project inside the directory RoFILib: https://github.com/paradise-fi/RoFI/tree/SMT/RoFILib). The process /usr/share/code/code /usr/share/code/resources/app/out/bootstrap-fork --type=extensionHost causes 100% load on one of the CPU cores all the time the project is open. This basically makes it unusable as it drains the battery on a laptop quickly. Might this be related to the cpptools? I am using Ubuntu 19.04, VSCode 1.39.2
@yaqwsx Is this caused by https://github.com/microsoft/vscode-cpptools/issues/4470 ? We plan on releasing a fix Monday.
@yaqwsx Actually, does your issue repro with our C/C++ extension disabled? The 4470 issue would have CPU usage in the Microsoft.VSCode.CPP.Extension.linux process.
@sean-mcmanus Thanks, it seems it was caused by #4470.
3 Possibilities:
1- The extension C/C++ by microsoft working poorly with gcc-7. Try clang-9.
2- Don't forget to correctly set your C_Cpp.default.includePath and C_Cpp.default.browse.path which can give impression of slow intellisense if not set properly What is the difference between includePath and browse.path?. Now I just include every headers I need in both of them.
3- New update for C/C++ extension is broken. Installing an older version from a month ago (0.27) makes it work perfect.
We need more information to fully investigate this issue. If you update to the latest version of the extension and your issue persists, please open a new issue with additional information that can help us investigate your issue.
Thank you!
Most helpful comment
3 Possibilities:
1- The extension C/C++ by microsoft working poorly with gcc-7. Try clang-9.
2- Don't forget to correctly set your
C_Cpp.default.includePathandC_Cpp.default.browse.pathwhich can give impression of slow intellisense if not set properly What is the difference between includePath and browse.path?. Now I just include every headers I need in both of them.3- New update for C/C++ extension is broken. Installing an older version from a month ago (0.27) makes it work perfect.