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 Symbol in Workspace..." has very slow "init-time" on large projects #7908

Closed
noam-zur opened this issue Aug 3, 2021 · 7 comments
Closed
Assignees
Labels
bug Feature: Symbol Search fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance
Milestone

Comments

@noam-zur
Copy link

noam-zur commented Aug 3, 2021

Bug type: Language Service

  • OS and Version: Windows10 (Version 2004)
  • VS Code Version: 1.58.2
  • C/C++ Extension Version: v1.5.1

"Go To Symbol in Workspace..."(CTRL+T) is very slow on large projects.

As a benchmark, I opened a workspace on Linux code base, and searched for "memory".
Results for the first search are abnormally long (~25 seconds)

Notes:

  1. I set C_Cpp.intelliSenseEngine to "Tag Parser" (my preferred choice)
  2. The workspace was fully parsed before running the search.
  3. For comparison, on Source Insight IDE, results for the same symbol search are instant (<1s).

Expected behavior
Full Workspace Symbols Search should return results faster

@sean-mcmanus
Copy link
Collaborator

I'm seeing the 1st Go to Symbol be slow but then it speeds up, but still takes a few seconds. Is that what you're seeing or do you see 25 seconds repeatedly?

@noam-zur
Copy link
Author

noam-zur commented Aug 4, 2021

Hi @sean-mcmanus , your observation is correct - it takes 25-30s on first search (after each time the editor is started).
Afterwards, it takes ~3s per search, which is still problemtic when trying to browse large code bases.
Let us have this issue(#7908) deal with the 25s "init-time".
I opened new issue(#7914) to deal with the "snappiness" of additional of searches.

@noam-zur noam-zur changed the title "Go To Symbol in Workspace..." is very slow on large projects "Go To Symbol in Workspace..." has very slow "init-time" on large projects Aug 4, 2021
@noam-zur
Copy link
Author

noam-zur commented Aug 6, 2021

I have started to debug the issue and traced the time-consuming call to:
workspaceSymbolProvider.ts line 20:
const symbols: LocalizeSymbolInformation[] = await this.client.languageClient.sendRequest(GetSymbolInfoRequest, params);

Now I am trying to understand if I can I debug it any further or the request is being handled by a closed-source client process.
@sean-mcmanus, can you please comment on this?
Any pointers where to look into next will be appreciated

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Aug 7, 2021

It's in our closed source cpptools server binary. The slow Go to Symbol in Workspace issue issue has been known for 5 years or so...the code hasn't changed much in 5 years, i.e. we've been working on other systems, and improving the performance of Go to Symbol in Workspace hasn't gotten high enough priority. As I recall, it's not an easy fix, and involves code shared with VS.

@sean-mcmanus
Copy link
Collaborator

You could try to run a profiler on cpptools to get more performance data: https://github.com/microsoft/vscode-cpptools/wiki/Troubleshooting-Performance-Issues ...but it's unlikely the results of that would lead us to be able to quickly fix it.

@noam-zur
Copy link
Author

noam-zur commented Aug 8, 2021

Thank you @sean-mcmanus for your clear response.
While a bit dissapointing, it is still good to know that no fix is expected soon.
I will try to search for alternatives on my end.
Thanks!

@sean-mcmanus sean-mcmanus added this to the 1.7.0 milestone Aug 18, 2021
@sean-mcmanus sean-mcmanus self-assigned this Aug 18, 2021
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Aug 25, 2021
@sean-mcmanus sean-mcmanus modified the milestones: 1.7.0, On Deck Sep 9, 2021
@sean-mcmanus sean-mcmanus removed fixed Check the Milestone for the release in which the fix is or will be available. quick fix labels Sep 9, 2021
@sean-mcmanus sean-mcmanus removed their assignment Sep 9, 2021
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.19 Nov 28, 2023
@fearthecowboy
Copy link
Member

A significant update to Go To Symbol has been published in the insiders build - see #11557

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Symbol Search fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance
Projects
None yet
Development

No branches or pull requests

5 participants