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

Freeze/delayed input when editing c_cpp_properties.json

Open CR82 opened this issue 9 months ago • 3 comments

Environment

  • Windows 10 Enterprise 22H2
  • VS Code Version: 1.99.3
  • C/C++ Extension Version: 1.25.3

Bug Summary and Steps to Reproduce

Bug Summary: When I edit c_cpp_properties.json it freezes, i.e. the next input is often delayed (5 to 15 seconds). This happens after every few keystrokes. Our codebase has around 8000 C/C++ files with 2 million lines of code.

Steps to reproduce: See summary.

Expected behavior: No input delay when editing c_cpp_properties.json.

Configuration and Logs

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**/Interfaces/**",
                "${workspaceFolder}/**/BxPackaging/**",
                "${workspaceFolder}/**/DeveloperTools/**",
                "${workspaceFolder}/**/RuntimeExtensions/**",
                "${workspaceFolder}/**/Biometrics/**",
                "${workspaceFolder}/**/DataBinding/**",
                "${workspaceFolder}/**/Utility/**"
            ],
            "defines": [
                "WIN32"
            ],
            "windowsSdkVersion": "10.0.22621.0",
            "compilerPath": "cl.exe",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "windows-msvc-x64",
            "compilerArgs": [
                "/std:c++11"
            ],
            "browse": {
                "path": [
                    "${workspaceFolder}/**/Interfaces/**",
                    "${workspaceFolder}/**/BxPackaging/**",
                    "${workspaceFolder}/**/DeveloperTools/**",
                    "${workspaceFolder}/**/RuntimeExtensions/**",
                    "${workspaceFolder}/**/Biometrics/**",
                    "${workspaceFolder}/**/DataBinding/**",
                    "${workspaceFolder}/**/Utility/**"
                ],
                "limitSymbolsToIncludedHeaders": true
            }
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

CR82 avatar May 07 '25 05:05 CR82

Hi @CR82,

Thank you for reporting this. It looks like there is potentially a lot of synchronous I/O happening for the path validation when glob paths are used.

bobbrow avatar May 07 '25 17:05 bobbrow

Thanks for the hint @bobbrow . I changed my paths to only GLOB at the end, i.e. "${workspaceFolder}/subdir1/subdir2/Interfaces/**", which resolves the issue for me.

CR82 avatar May 15 '25 07:05 CR82

Thanks for the update @CR82. That confirms my suspicions. I'm glad you were able to craft a workaround for this until we can fix it.

bobbrow avatar May 15 '25 16:05 bobbrow