microsoft / microsoft/vscode-cpptools

performance issues editing header files on embedded system with SD card

Aperta
#9,339 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Language Service performance
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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:

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci la configurazione segnalata: VS Code con l'estensione C/C++, un progetto CMake all'interno di un container Docker Ubuntu 18.04 su un sistema embedded che utilizza lo spazio di archiviazione di una scheda SD. Inizia dalla pagina relativa alla risoluzione dei problemi di prestazioni di C/C++, C/C++: Log Diagnostics e dai log del language server; confronta il comportamento con intelliSenseCacheSize impostato su 0. Il lavoro è completato quando è stata identificata la fonte del ritardo e sono state stabilite prestazioni di modifica coerenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cmake, cpp, docker, ubuntu, vscode
Ambito
devtools, operating-systems, performance
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.