-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 File... is extraordinarily slow. #1472
Comments
I'm able to repro the issue. This problem has existed "forever". Our symbol search engine appears to be iterating over all symbols in the entire database, so the operation is linear in the size of your browse.path so most of the time it is just hitting symbols in different files. It's faster the 2nd time because it cashes the results. |
So, the search doesn't understand the "in File..." part of "Go to Symbol." Thank you for looking into this, @sean-mcmanus. |
We were actually computing the search results quickly for the specific file, but afterwards a 2nd workspace cache building operation was being done unnecessarily, blocking the results. The search results (and all other operations) can still be blocked by the red flame if your translation unit takes too long to parse, but that's a different issue. |
Fixed with the preview .vsix at https://github.com/Microsoft/vscode-cpptools/releases/tag/v0.15.0-insiders (our final release is planned for next week). Go to Symbol in Workspace can still be slow the 1st time due to the symbol cache generation and if you do a Go to Symbol in Workspace right before a Go to Symbol in File, it can block the "in File" results, because they're sent to the same processing queue. |
Thanks, @sean-mcmanus! So far it's working like a charm. I really appreciate it. |
It's still extremely slow on Linux Version 1.24.1 + Python 2018.5.0 (05 Jun 2018) |
@ababak Can you provide more repro info in a new bug? Go to Symbol in File should be really fast unless it's blocked by another operation (e.g. testing with Chromium on Linux). Is there a red flame in the bottom right? Did you do a Go to Symbol in Workspace? |
I can confirm "Go to Symbol in File..." is most times very very slow on 1.24.1
|
@peterlevi Could you file your issue with the python extension? This is the C/C++ extension. |
Thank you, sorry for the confusion, filed here: microsoft/vscode-python#2050 |
@sean-mcmanus : Was this issue fixed ? I recently switched from Sublime to VS Code for C/C++ and one thing i noticed is that that "Go to Symbol in Workspace" is very slow. I enter the symbol that i am interested in and the results only show up after 4-5 seconds. My project is not super large. Maybe close to a 1000 files. However" Go to Symbol in file" is super fast and also supports the fuzzy search. Is there any way to speed up the "Go to Symbol in Workspace" and also add the fuzzy search functionality ? |
@princehektor This bug was about Go to Symbol in File and not Go to Symbol in Workspace. It looks like we don't have an issue tracking the slowness with Go to Symbol in Workspace (it's a known issue, but I can't locate it). I could create a new issue or you can if you want. Go to Symbol in Workspace should be fast if you only have 1000 files though, could be some other issue (but 4-5 seconds might be expected, or it's possible the request could be blocked by IntelliSense: #1928 ). |
@sean-mcmanus : Oh my bad. I did not know that this issue was tracking a different problem. I created another issue for this - #2628 |
I'm coming from Sublime Text, so maybe I'm a bit spoiled in this regard, but one of the main features I use in Sublime Text is searching for symbols. VS Code has this feature, but for some reason it takes an extremely long time for any symbols to be found in my project. The project is massive, and some files can be quite large themselves, however this happens even with small files (e.g. < 400 lines) and seems like it should be a pretty standard procedure no matter the project size.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: