microsoft / microsoft/vscode-cpptools
performance issues editing header files on embedded system with SD card
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Describe the bug
- Latest MacOS "client" connected to small embedded linux Ubuntu 18.04 remote machine "target" via SSH and inside that Ubuntu 18.04 docker container using an SD card for storage
- VS Code version 1.67.1
- C/C++ extension version 1.10.2 pre-release (due to https://github.com/microsoft/vscode-cpptools/issues/9247)
- Only other extensions installed are cmake and cmake tools
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
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-arm64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
Logs from running C/C++: Log Diagnostics from the VS Code command palette
-------- Diagnostics - 5/20/2022, 5:49:21 PM
Version: 1.10.2
Current Configuration:
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-arm64",
"configurationProvider": "ms-vscode.cmake-tools",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"mergeConfigurations": false,
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Custom browse configuration:
{
"browsePath": [
"##redacted##",
"##redacted##",
"##redacted##",
"##redacted##",
"##redacted##"
],
"compilerPath": "/usr/bin/aarch64-linux-gnu-g++",
"compilerArgs": [
"-g"
],
"compilerArgsLegacy": [
"-g"
]
}
Custom configurations:
[ ##redacted## ]
{
"defines": [
"GLFW_DLL"
],
"includePath": [
"##redacted##",
"##redacted##",
"##redacted##",
"##redacted##",
"##redacted##"
],
"compilerPath": "/usr/bin/aarch64-linux-gnu-g++",
"compilerArgs": [
"-g"
]
}
Translation Unit Mappings:
[ ##redacted## ]:
##redacted## *
Translation Unit Configurations:
[ ##redacted## ]:
Process ID: 4899
Memory Usage: 200 MB
Compiler Path: /usr/bin/aarch64-linux-gnu-g++
Includes:
##redacted##
##redacted##
##redacted##
##redacted##
##redacted##
##redacted##
Defines:
GLFW_DLL
Standard Version: c++14
IntelliSense Mode: linux-gcc-arm64
Other Flags:
--g++
--gnu_version=70500
Total Memory Usage: 200 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 29046
Number of files parsed: 2771
Logs 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported setup: VS Code with the C/C++ extension, a CMake project inside an Ubuntu 18.04 Docker container on an embedded system using SD-card storage. Start with the C/C++ performance troubleshooting page, C/C++: Log Diagnostics, and the language-server logs; compare behavior with intelliSenseCacheSize set to 0. Done means identifying the source of the delay and establishing consistent editing performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, docker, ubuntu, vscode
- Domain
- devtools, operating-systems, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100