microsoft / microsoft/vscode-cpptools

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

Open
#13,079 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Find All References Feature: Rename Language Service performance
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.

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.