vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Intellisense gets slower over time

Open billgan1024 opened this issue 1 year ago • 4 comments

Environment

Version: 1.83.0-insider Commit: bccfade64adb249f57c8fcf03cba41609f76ce5c Date: 2023-09-15T05:34:53.161Z Electron: 25.8.1 ElectronBuildId: 23779380 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.2.0-32-generic

Bug Summary and Steps to Reproduce

Bug Summary: This issue is similar to https://github.com/microsoft/vscode-cpptools/issues/2994. Intellisense progressively becomes slower as I work across cpp and header files. Seems like large header files are not cached properly because jumping to a definition inside a large header becomes slow after 3 or 4 attempts.

Edit: Looking at the debug logs, it seems like requests to the LSP are not handled properly when I send them too quickly. I have attached logs showing what happens when I perform the repro steps

Steps to reproduce:

  1. Open a project that uses a big header e.g. vulkan
  2. Use a class from the header
  3. repeatedly press f12 to go to definition, and then ctrl+alt+- to go back

Expected behavior: Once intellisense finishes loading, f12 should be instant Actual behaviour: After 3 or 4 attempts of going to definition, intellisense starts to become very slow

Configuration and Logs

c_cpp_properties.json:  n/a

C/C++ log diagnostics:
-------- Diagnostics - 18/09/2023, 19:24:55
Version: 1.17.5
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "/home/pblpbl/Vulkan/**"
    ],
    "defines": [],
    "compilerPath": "/usr/bin/clang",
    "cStandard": "c17",
    "cppStandard": "c++14",
    "intelliSenseMode": "linux-clang-x64",
    "compilerPathInCppPropertiesJson": "/usr/bin/clang",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": false,
    "mergeConfigurations": false,
    "compilerPathIsExplicit": false,
    "configurationProvider": "ms-vscode.cmake-tools",
    "browse": {
        "path": [
            "/home/pblpbl/Vulkan/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Custom browse configuration: 
{
    "browsePath": [
        "/home/pblpbl/Vulkan/external",
 
        "/home/pblpbl/Vulkan/shaders/glsl/parallaxmapping",
        "/home/pblpbl/Vulkan/shaders/hlsl/parallaxmapping",
        "/home/pblpbl/Vulkan/examples/particlesystem",
        "/home/pblpbl/Vulkan/shaders/glsl/particlesystem",
        "/home/pblpbl/Vulkan/shaders/hlsl/particlesystem",
        "/home/pblpbl/Vulkan/examples/pbrbasic",
        "/home/pblpbl/Vulkan/shaders/glsl/pbrbasic",
...
        "/home/pblpbl/Vulkan/shaders/hlsl/vulkanscene"
    ],
    "compilerPath": "/usr/bin/g++",
    "compilerArgs": [],
    "compilerFragments": [
        " -DVK_USE_PLATFORM_XCB_KHR -DNOMINMAX -D_USE_MATH_DEFINES -g",
        "-std=gnu++11"
    ]
}
Custom configurations:
[ /home/pblpbl/Vulkan/examples/bloom/bloom.cpp ]
{
    "includePath": [
        "/home/pblpbl/Vulkan/external",
        "/home/pblpbl/Vulkan/external/glm",
        "/home/pblpbl/Vulkan/external/gli",
        "/home/pblpbl/Vulkan/external/imgui",
        "/home/pblpbl/Vulkan/external/tinygltf",
        "/home/pblpbl/Vulkan/external/ktx/include",
        "/home/pblpbl/Vulkan/external/ktx/other_include",
        "/home/pblpbl/Vulkan/base"
    ],
    "defines": [
        "VK_EXAMPLE_ASSETS_DIR=\"/home/pblpbl/Vulkan/assets/\"",
        "VK_EXAMPLE_SHADERS_DIR=\"/home/pblpbl/Vulkan/shaders/\"",
        "_CRT_SECURE_NO_WARNINGS"
    ],
    "compilerPath": "/usr/bin/g++",
    "compilerArgs": [],
    "compilerFragments": [
        " -DVK_USE_PLATFORM_XCB_KHR -DNOMINMAX -D_USE_MATH_DEFINES -g",
        "-std=gnu++11"
    ]
}
cpptools version (native): 1.17.5.0
Translation Unit Mappings:
[ /home/pblpbl/Vulkan/examples/bloom/bloom.cpp ]:
    /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
    /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h *
Translation Unit Configurations:
[ /home/pblpbl/Vulkan/examples/bloom/bloom.cpp ]:
    Process ID: 11993
    Memory Usage: 760 MB
    Compiler Path: /usr/bin/g++
    Includes:
        /home/pblpbl/Vulkan/external
...
        /usr/include/x86_64-linux-gnu
        /usr/include
    Defines:
        VK_EXAMPLE_ASSETS_DIR="/home/pblpbl/Vulkan/assets/"
        VK_EXAMPLE_SHADERS_DIR="/home/pblpbl/Vulkan/shaders/"
        _CRT_SECURE_NO_WARNINGS
        VK_USE_PLATFORM_XCB_KHR
        NOMINMAX
        _USE_MATH_DEFINES
    Standard Version: c++11
    IntelliSense Mode: linux-gcc-x64
    Other Flags:
        --g++
        --gnu_version=110400
Total Memory Usage: 760 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 12877
Number of files parsed: 1681





Language server logs:
loggingLevel: Debug
cpptools version (TypeScript): 1.17.5
cpptools version (native): 1.17.5.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
LSP: cpptools/queryCompilerDefaults (id: 1)
Querying compiler for default C++ language standard using command line: /usr/bin/clang -x c++ -E -dM /dev/null
Detected language standard version: c++14
Querying compiler's default target using command line: "/usr
  Processing folder (recursive): /home/pblpbl/Vulkan/shaders/glsl/descriptorindexing/
  Processing folder (recursive): /home/pblpbl/Vulkan/shaders/hlsl/descriptorindexing/
  Processing folder (recursive): /home/pblpbl/Vulkan/examples/descriptorsets/
  Processing folder (recursive): /home/pblpbl/Vulkan/shaders/glsl/descriptorsets/
... 
  tag parsing file: /home/pblpbl/Vulkan/external/stb/stb_font_consolas_24_latin1.inl
  Parsing: 1681 files(s) processed
Done parsing remaining files.
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 24)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 25)
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 26)
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 27)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 28)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 29)
LSP: $/cancelRequest (textDocument/hover, id: 29)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 30)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 31)
LSP: cpptools/queryTranslationUnitSource: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 32)
LSP: textDocument/didOpen: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 33)
LSP: cpptools/getDocumentSymbols: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 34)
LSP: cpptools/textEditorSelectionChange
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Unable to access browse database. (query_cik_in_file)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 35)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 36)
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 37)
Database safe to open.
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 38)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 39)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 40)
Error squiggle count: 0
Error squiggle count: 0
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 40)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 40)
Update IntelliSense time (sec): 1.949
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 41)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 42)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 43)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 44)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 45)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 46)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 47)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 48)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 49)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Error squiggle count: 0
Error squiggle count: 0
Update IntelliSense time (sec): 1.135
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 50)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 51)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 52)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 53)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 54)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 55)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 56)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 57)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 58)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 59)
Error squiggle count: 0
Error squiggle count: 0
Update IntelliSense time (sec): 1.83
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 60)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 61)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 62)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 63)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 62)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 62)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 64)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 65)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 66)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 67)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 68)
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 69)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 70)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 71)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 72)
Error squiggle count: 0
Error squiggle count: 0
Update IntelliSense time (sec): 2.693
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 73)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 74)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 74)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 74)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 75)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 76)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 77)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 78)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 79)
LSP: $/cancelRequest (textDocument/documentHighlight, id: 79)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 80)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 81)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 82)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 83)
LSP: $/cancelRequest (cpptools/getInlayHints, id: 80)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 81)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 82)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 84)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 85)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 84)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 82)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 86)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 87)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 88)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 89)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 90)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 91)
LSP: $/cancelRequest (textDocument/documentHighlight, id: 91)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 92)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 93)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 94)
LSP: $/cancelRequest (cpptools/getInlayHints, id: 92)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 93)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 94)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 95)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 96)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 95)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 94)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Error squiggle count: 0
Error squiggle count: 0
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 97)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 98)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 99)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 98)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 98)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 100)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 101)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 102)
LSP: $/cancelRequest (textDocument/documentHighlight, id: 102)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 103)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 104)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 105)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 106)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 107)
LSP: $/cancelRequest (cpptools/getInlayHints, id: 103)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 104)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 105)
LSP: $/cancelRequest (textDocument/hover, id: 107)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 108)
LSP: $/cancelRequest (textDocument/hover, id: 108)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 109)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 105)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 107)
Error squiggle count: 0
Error squiggle count: 0
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 110)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 111)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 110)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 112)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 113)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 114)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 115)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 116)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 114)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 114)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 117)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 118)
LSP: $/cancelRequest (textDocument/documentHighlight, id: 118)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 119)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 120)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 121)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 122)
LSP: $/cancelRequest (cpptools/getInlayHints, id: 119)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 120)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 121)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 123)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 124)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 123)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 121)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Error squiggle count: 0
Error squiggle count: 0
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 125)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 126)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 127)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 126)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 126)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 128)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 129)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 130)
LSP: $/cancelRequest (textDocument/documentHighlight, id: 130)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 131)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 132)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 133)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 134)
LSP: $/cancelRequest (cpptools/getInlayHints, id: 131)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 132)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 133)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 135)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 136)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 135)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 133)
Error squiggle count: 0
Error squiggle count: 0
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 137)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 138)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 139)
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 140)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 139)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 139)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Error squiggle count: 0
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 141)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 142)
Error squiggle count: 0
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 142)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 142)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 143)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 144)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 145)
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 146)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 147)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 148)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 149)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 147)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 150)
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 151)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
Error squiggle count: 0
Error squiggle count: 0
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 152)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 153)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 154)
LSP: $/cancelRequest (cpptools/getFoldingRanges, id: 154)
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 155)
LSP: Request canceled by server (<unknown/completed>, code: -32802, id: 154)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 156)
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/textEditorSelectionChange
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 157)
LSP: $/cancelRequest (textDocument/documentHighlight, id: 157)
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 158)
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 159)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 158)
Error squiggle count: 0
Error squiggle count: 0
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 160)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 161)
Error squiggle count: 0
Error squiggle count: 0
LSP: $/cancelRequest (textDocument/hover, id: 161)
Update IntelliSense time (sec): 110.908
LSP: textDocument/definition: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 162)
LSP: textDocument/hover: file:///home/pblpbl/Vulkan/examples/bloom/bloom.cpp (id: 163)
LSP: $/cancelRequest (textDocument/hover, id: 163)
LSP: cpptools/activeDocumentChange: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 164)
LSP: cpptools/textEditorSelectionChange
LSP: cpptools/getSemanticTokens: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 165)
LSP: textDocument/documentHighlight: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 166)
idle loop: reparsing the active document
Checking for syntax errors: /home/pblpbl/Vulkan/external/vulkan/vulkan_core.h
Queueing IntelliSense update for files in translation unit of: /home/pblpbl/Vulkan/examples/bloom/bloom.cpp
LSP: cpptools/getInlayHints: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 167)
LSP: cpptools/getCodeActions: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 168)
LSP: cpptools/getFoldingRanges: file:///home/pblpbl/Vulkan/external/vulkan/vulkan_core.h (id: 169)

Other Extensions

The issue is still present even when cpptools is the only enabled extension.

Additional context

This behaviour also happens on windows.

billgan1024 avatar Sep 18 '23 23:09 billgan1024

Hello, I'm sorry that we missed this issue. We recently released an IntelliSense overhaul that should improve the scenario you described. Previously, we were not able to pre-empt expensive IntelliSense operations with faster commands like go to definition. This should be possible starting in the 1.19.2 pre-release. Please give it a try and let us know if your issue still persists.

bobbrow avatar Jan 23 '24 17:01 bobbrow

no, still not working.

https://github.com/microsoft/vscode-cpptools/assets/17630457/76135302-b218-43f2-825b-36619a78f71e

billgan1024 avatar Feb 03 '24 00:02 billgan1024

Ok. Thanks for the update. I'll reopen this issue.

bobbrow avatar Feb 03 '24 01:02 bobbrow

Hi @billgan1024 . When you activate a file, that initiates an IntelliSense pass on that file (even if it has not changed). This is partly a failsafe to accommodate for other causes of changes, such having edited a header used by that file since it was last active, or having edited the file in another editor. Switching between files also triggers a flurry of requests from VS Code, for things like semantic tokens and folding ranges. I believe what you've captured in your prior comment is the impact of other simultaneous operations. When there are other operations in progress, new requests may be delayed behind them. This type of work should not be slowing down IntelliSense over time, per se.

For this type of issue, getting the C/C++ log channel output (with the "C_Cpp.loggingLevel": "Debug") would be helpful to correlate what is also ongoing while you're seeing a performance issue. (I do not see any issue in the log output you provided earlier. If you can show the output simultaneously with the recording of slow operations, perhaps that can show a correlation.)

Colengms avatar Feb 05 '24 19:02 Colengms

This issue has been closed because it needs more information and has not had recent activity.

github-actions[bot] avatar Mar 11 '24 11:03 github-actions[bot]

This issue is a lost cause. My only request now is that Code - OSS be renamed as to stop appropriating open source values and to stop tempting people to waste their time filing issues here.

billgan1024 avatar Mar 20 '24 08:03 billgan1024

I'm sorry that this frustrates you. As your video shows, sometimes it's instant and sometimes it's not. There is a lot of complexity involved in writing a language server. We are always striving to improve all the scenarios and appreciate your feedback, but insults will be moderated per our code of conduct.

bobbrow avatar Mar 20 '24 16:03 bobbrow

With all due respect, I don’t think it’s in good taste to cry about how hard it is to maintain a language server while simultaneously keeping it locked down and proprietary.

billgan1024 avatar Mar 20 '24 20:03 billgan1024