Skip to content

C/C++ intellisense extremely slow with large codebases (due to populating file name cache) #12169

Closed

Description

Environment

  • OS and Version: Windows 11 (Windows_NT x64 Build 10.0.22631)
  • VS Code Version: 1.86.2 (system setup)
  • C/C++ Extension Version: v1.19.9
  • If using SSH remote, specify OS of remote machine: Output of uname -a
    Linux hp-PowerEdge-T440 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Bug Summary and Steps to Reproduce

Bug Summary:

Large codebases like ns-3 take 2~5 min after opening and ~10s after that for whichever file you open to prepare syntax highlighting and IntelliSense.

Steps to reproduce:

  1. Git clone https://gitlab.com/nsnam/ns-3-dev.git
  2. Checkout any release tag. I am using v3.40. git checkout tags/ns-3.40
  3. Open the folder in VSCode.
  4. Open any file.
  5. Watch the syntax highlighting and IntelliSense take ages to load. (Build all CMake targets first if it fails)
  6. The problem is more pronounced when using third-party modules. (More code in the contrib directory)

Expected behaviour:

  1. Speed up the process, please. If VSCode needs more processes, it can have them.
  2. If direct speedup is not possible, VSCode should at least prepare IntelliSense for the files open in the current workspace in the background after the working file is ready.

Configuration and Logs

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/build/include"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c17",
            "cppStandard": "gnu++17",
            "intelliSenseMode": "linux-gcc-x64",
            "configurationProvider": "ms-vscode.cmake-tools"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

htop shows only a single CPU core at 100% when a new file is opened. All the others are idle. (<10%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.performance

Type

No type

Projects

  • Status

    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions