microsoft / microsoft/vscode-cpptools
`Go to References` always reparses a lot of files for the same symbol
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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.
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing repeated Go to References lookups in the remote Linux Kernel workspace and compare them with Go to Definition. Trace which files are reparsed between identical lookups; done means unchanged files are not reparsed and repeated reference searches complete without the reported delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100