-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C/C++ Intellisense slow and unresponsive (v1.19.9) #12126
Comments
Hi @AlexDai54202 . Would you be able to reproduce your captures with the |
Gotcha! This capture is after I set the logging level to Debug. Apologies for the video not being embedded; the file is over 10 MB and I assume clarity is important here. Additionally, the intellisense update delay does appear to be 1000ms. |
Hi @AlexDai54202, the update delay is for when we check for errors. We delay error checking so that you're not getting tons of red squiggles while you're in the middle of typing stuff that's still incomplete/uncompilable. The completion suggestions should not be impacted by this delay. Your video is interesting and actually perfect because it shows the debug logging. What I am seeing in your logs is that the language server is restarting repeatedly. Something is shutting it down or it is crashing. That's why it's so slow. It's like it's compiling your file for every completion event and that's not expected. Can you drop a .txt file in this issue with the full debug log for this scenario? It scrolls by too fast in the video. I tried your second scenario with the simple video.mp4 |
Thanks for the followup! Just in case I goofed up somewhere, here's the process I used to get the log. And here's the log I got! Just in case this may end up being helpful: in Youtube, users can use |
Hi @AlexDai54202 . Have you set any of the following settings to values other than their defaults? Those settings influence when we recycle IntelliSense translation units. Hypothetically, I might expect a problem like this to occur if those limits are set too low, causing IntelliSense translation units to be recycled almost immediately. Otherwise, we're looking for some clue as to why your IntelliSense processes are only sticking around for a very short time. They appear to be getting shut down gracefully, before being immediately started again. Does this happen for you with multiple different projects, or on a different machine? |
Can you share how you configured your WSL/Docker server? I'm not sure if anyone on our team has worked with that before or not. |
Unfortunately, the docker image is not configured by me, rather by the course staff, so I'm not of much help there.
(Located at C:\Users\myusername.wslconfig) And my container configuration for vscode is
Which I got from the command palate (Open attached container configuration file) |
@AlexDai54202 Yeah, 2 GB of memory is likely going to be insufficient (4-8 GB is recommended as a minimum). You could use some program like top to see the memory usage of cpptools and cpptools-srv and your free memory? It looks like we'll tear down cpptools-srv if the free memory drops below 256 MB. Is your repro with just 1 .cpp file open or are you switching between multiple source files? |
@sean-mcmanus there's only one file open and we're tearing down IntelliSense while it's still in focus. I can't imagine a simple |
@bobbrow I'm seeing the memory usage by the OS, VS Code, and cpptools be > 2 GB. I think it can be fixed by ensuring 2 clients are kept active (and adding logging for when the IntelliSense processes are shutdown due to resource limits). |
@AlexDai54202 Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.20.0, although let us know if you're still seeing other issues in your scenario with the 2 GB docker container. |
Horribly sorry for not keeping up - this project was absolutely killing me. |
Environment
Linux d893f64b1111 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 GNU/Linux
Bug Summary and Steps to Reproduce
Bug Summary:
Intellisense takes multiple seconds to autofill or hint.
Untitled.video.-.Made.with.Clipchamp.10.mp4
Steps to reproduce
Expected behavior:
Configuration and Logs
Other Extensions
Additional context
Apologies in advance if this issue is written to be extremely informal; I'm an undergraduate student trying their best to complete their programming assignment. I can't seem to find a fix to this issue anywhere and this is genuinely driving me insane.
I don't think the issue is that there are too many active variables either; making a new .c file and writing something like
int aintegervariable = 0;
takes multiple seconds for intellisense to recognize and autofill and demonstrates the same issue.demo.mp4
Additional context:
This issue has persisted for almost the entire time I've used C/C++, so I would likely have the same issue even with the last couple dozen versions of this extension.
My device has 16 GB of RAM, and the CPU utilization is <40% half the time, and my SSD has around 500 GB of unused storage space, so I don't think the issue is in the hardware.
Once again, apologies for wasting your time if the issue isn't well written or through enough to debug.
The text was updated successfully, but these errors were encountered: