Skip to content
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

Go to References always reparses a lot of files for the same symbol #13079

Open
qianzhangxa opened this issue Dec 25, 2024 · 5 comments
Open

Comments

@qianzhangxa
Copy link

Environment

  • OS and Version: macOS Sequoia 15.2
  • VS Code Version: 1.96.2 (Universal)
  • C/C++ Extension Version: 1.22.11
  • If using SSH remote, specify OS of remote machine: Ubuntu 22.04.4 LTS

Bug Summary and Steps to Reproduce

Bug Summary:

I am using VS Code on my macOS to SSH remotely browse Linux Kernel code which I cloned on a Ubuntu Linux machine. When I click Go to References on a symbol, I see a lot of files need to be parsed (like the below) which takes ~10 mins. And next time when I click Go to References on the same symbol again, all those files will be parsed again! So every time it takes ~10 mins to show the references for the same symbol.

Image

Go to Definition doesn't seem to have this problem.

Expected behavior:

I'd expect all the files in the project to be parsed at the very beginning (i.e. when I open the project for the first time) and cache the result somewhere. Reparsing should only be done when there is some code changes.

Configuration and Logs

There is no `c_cpp_properties.json` file in `~/.vscode-server/` on my Ubuntu machine.

Other Extensions

No response

Additional context

No response

@sean-mcmanus
Copy link
Contributor

That is currently "by design" if you have a lot of files with lexical references to a particular symbol. Our current implementation doesn't save references to the database, but we may add that later.

@qianzhangxa
Copy link
Author

Thanks @sean-mcmanus for your reply! Do you happen to know when that will be added?

@sean-mcmanus
Copy link
Contributor

@qianzhangxa I do not know. Maybe @bobbrow might be able to give an estimate, but I don't know if that is something we want to publicly disclose.

@bobbrow
Copy link
Member

bobbrow commented Dec 30, 2024

It will be difficult to provide an estimate at this time. The work we are currently doing in this area is best described as "experimental" at this point. It is safe to say that we understand that we have significant inefficiencies with this feature right now and we are working to fix that.

@qianzhangxa
Copy link
Author

Thanks @bobbrow, looking forward to the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants