Skip to content

performance issues editing header files on embedded system with SD card #9339

@indirectlylit

Description

@indirectlylit

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 inconsistent versions of clang-format between platforms #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:

image

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions