8000 Intellisense takes an extremely long time to finish scanning · Issue #13562 · microsoft/vscode-cpptools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Intellisense takes an extremely long time to finish scanning #13562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CendioOssman opened this issue Apr 28, 2025 · 7 comments
Open

Intellisense takes an extremely long time to finish scanning #13562

CendioOssman opened this issue Apr 28, 2025 · 7 comments
Assignees
Labels
Language Service more info needed The issue report is not actionable in its current state performance

Comments

@CendioOssman
Copy link

Environment

  • OS and Version: Fedora 41
  • VS Code Version: code-1.99.3-1744761644.el8.x86_64
  • C/C++ Extension Version: 1.24.5

Bug Summary and Steps to Reproduce

Bug Summary:
Intellisense is almost unusable as it takes an extremely long time to update (at least minutes, possibly longer as I give up and just work without it).

Steps to reproduce:

  1. Open source file in TigerVNC project

Expected behavior:
Intellisense is ready within seconds

Configuration and Logs

<details>
<summary>c_cpp_properties.json</summary>


{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "cStandard": "c17",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

</details>

I'm not seeing any C/C++ in the OUTPUT panel.

Other Extensions

No response

Additional context

This is not a big project. It only has 1000 files. Something must be very broken here, but I don't know how to give more clues.

The language server is sometimes using a lot of CPU, but often it is just hovering around 10%. So I don't know what it is doing instead of scanning my files.

@sean-mcmanus
Copy link
Contributor
sean-mcmanus commented Apr 28, 2025

@CendioOssman Can you set C_Cpp.loggingLevel to "Debug" and look at the C/C++ output? Also, what does the C or C++ language status show on hover in the bottom right?

Also, 1.25.2 (pre-release) has a bunch of bug fixes, so you may want to try that too (we're planning to release that out of pre-release soon).

@sean-mcmanus sean-mcmanus self-assigned this Apr 28, 2025
@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state performance labels Apr 28, 2025
@CendioOssman
Copy link
Author

@CendioOssman Can you set C_Cpp.loggingLevel to "Debug" and look at the C/C++ output?

It finally completed here now, so I guess not much fun to log anymore. But I can see if I can provoke it again and turn on the logging.

Also, what does the C or C++ language status show on hover in the bottom right?

Unfortunately, I didn't take a screenshot so I don't have the exact text.. But both the "Intellisense" and "Parsing open files" were actively spinning.

At the moment, only "Parsing open files" is stuck working. Although I only have a single file open.

@sean-mcmanus
Copy link
Contributor

@CendioOssman If it's an IntelliSense update issue, then doing a right-click Restart IntelliSense for Active File could repro the issue again. "Parsing open files" also parses all the dependencies of a file. The "C/C++" logging should show "tag parsing" messages for the dependencies. If you see no logging and the cpptools process is not using any CPU, then it could be deadlocked (if hover is always stuck "Loading"). You could try setting C_Cpp.recursiveIncludes.reduce to "never" to cause IntelliSense to not be blocked on tag parsing if you keep hitting the issue.

@CendioOssman
Copy link
Author

@CendioOssman If it's an IntelliSense update issue, then doing a right-click Restart IntelliSense for Active File could repro the issue again.

That does not seem to get Intellisense spinning for any long time. It now completes in 5-10 seconds.

"Parsing open files" is still working, though. And the database is wildly incomplete. If I use "Find all references", then only some hits actually show up. I also get this warning:

[Warning] Some references may be missing, because workspace parsing was incomplete when Find All References was started.

"Parsing open files" also parses all the dependencies of a file. The "C/C++" logging should show "tag parsing" messages for the dependencies. If you see no logging and the cpptools process is not using any CPU, then it could be deadlocked (if hover is always stuck "Loading"). You could try setting C_Cpp.recursiveIncludes.reduce to "never" to cause IntelliSense to not be blocked on tag parsing if you keep hitting the issue.

Yes, I'm seeing "tag parsing file", followed by "Database is safe to open" every now and the. But they are coming in very slowly. And there are no log lines besides those two.

I'm a bit unfamiliar with the distinction between the "Intellisense" and "Parsing open files" blocks. Are they both part of the Intellisense mechanism, or are they two different things?

@CendioOssman
Copy link
Author

Actually, both processes just went idle:

Image

But it still fails to find all references. But no longer warns.

@harry-cpp
Copy link
harry-cpp commented Apr 29, 2025

I'm seeing a lot of issues as well since updating the extension, it gets stuck on intelisense and pauses workspace parsing, last version that worked fine for me was 1.23.6 so downgraded to it and let it rescan the project.

I'll probably have time later this week to try and track down the commit that caused the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Service more info needed The issue report is not actionable in its current state performance
Projects
Status: No status
Development

No branches or pull requests

3 participants
0