-
Notifications
You must be signed in to change notification settings - Fork 1.6k
performance issues editing header files on embedded system with SD card #9339
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
Comments
Hi @indirectlylit . Thanks for reporting this. We can use this issue to track investigating further. However, given the variety of different features that exhibit performance issues (i.e. Formatting, which does not leverage our IntelliSense engine), I suspect the performance issue may be related to SSH or Docker. If so, you may be able to confirm this if you detect similar issues with other extensions, such as language services for other languages. |
Thanks for response. I understand that this is a tricky one because I can't give clear steps to reproduce. On my side, I can say that:
If you have any suggestions on a test I can run to narrow down where the problem is I'd be happy to help. Otherwise I'd recommend we close this issue so it doesn't become a catch-all for a range of performance issues. |
(I'd also be interested in better understanding the implications of setting |
The formatting is likely just getting stuck being an IntelliSense update operation. The intelliSenseCache setting will cause .ipch files to be created/read which store info about the headers -- on some setups this may hurt performance, particular if the headers are being modified. |
Hi, thank you @sean-mcmanus
Do you mean that it might be blocked by or stuck behind an IntelliSense update?
Yes, I think this is indeed the culprit.
On the other hand, editing |
I mean the thread that handles the formatting message is stuck in a queue waiting for the IntelliSense update to finish. A related issue is #5362 -- we should probably disable the ipch cache for the TU automatically if the header is editted instead of repeatedly rebuiding it. |
Thanks, that makes sense. On embedded systems like the Raspberry Pi or Jetson Nano with slow SD cards used for storage, reading or writing large amounts of data can be a major bottleneck. In my situation, VS Code was essentially unusable until disabling the cache. |
Describe the bug
I have a cmake-based build configuration and intellisense is correctly finding all dependencies and providing full and correct reporting of issues related to type hints.
Functionality such as auto-completion, problem-reporting, and auto-formatting are incredibly slow when editing header files. For example, occasionally after saving a file I'll see this for a solid 10s or so even on a simple file:
Based on this comment I tried setting
"C_Cpp.intelliSenseCacheSize": 0
and it has helped the situation.Steps to reproduce
Set up a C++ project on an embedded system like a Raspberry Pi or Jetson Nano and try editing header files.
Expected behavior
Relatively consistent and hopefully snappy intellisense and auto-formatting performance
Code sample and logs
Configurations in
c_cpp_properties.json
Logs from running
C/C++: Log Diagnostics
from the VS Code command paletteLogs from the language server logging - let me know if this would be helpful.
Additional context
Let me know if there are further steps I can easily take to identify offending processes. I briefly looked at the Troubleshooting page, but the
perf
profiling tool does not seem to be available on the embedded ARM platform I'm currently developing against (NVIDIA tegra) and compiling/installing it didn't go smoothly.The text was updated successfully, but these errors were encountered: