You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go to Symbol in File... is extraordinarily slow. #1472
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.
VSCode Version: 1.19.2
OS Version: Windows 7 x64
C/C++ Extension Version: 0.14.6
Steps to Reproduce:
Open a .cpp file with function definitions inside (obviously don't open a blank .cpp file)
Go > Go to Symbol in File...
If it is the first time running this, no symbols will be found (esc. and try step 2 again)
Wait for symbols to be parsed - it will sit there searching for a long time
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.
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.
Andriy Babak (@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
(on Ubuntu 16.04) on a largish Python file (~1500 lines) - most times I'm just looking at the animated thingie. Second time it sometimes appears fast, next time it's slow again. Using it on this file: https://github.com/peterlevi/ojo/blob/master/ojo/ojo.py (vscode started directly in the root of that whole repo)
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 ?
amadhus (@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 ).
Activity
sean-mcmanus commentedon Jan 19, 2018
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.
Zooce commentedon Jan 19, 2018
So, the search doesn't understand the "in File..." part of "Go to Symbol." Thank you for looking into this, Sean McManus (@sean-mcmanus).
sean-mcmanus commentedon Jan 19, 2018
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.
sean-mcmanus commentedon Feb 5, 2018
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.
Zooce commentedon Feb 5, 2018
Thanks, Sean McManus (@sean-mcmanus)! So far it's working like a charm. I really appreciate it.
ababak commentedon Jun 19, 2018
It's still extremely slow on Linux Version 1.24.1 + Python 2018.5.0 (05 Jun 2018)
sean-mcmanus commentedon Jun 19, 2018
Andriy Babak (@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?
peterlevi commentedon Jun 21, 2018
I can confirm "Go to Symbol in File..." is most times very very slow on 1.24.1
(on Ubuntu 16.04) on a largish Python file (~1500 lines) - most times I'm just looking at the animated thingie. Second time it sometimes appears fast, next time it's slow again. Using it on this file: https://github.com/peterlevi/ojo/blob/master/ojo/ojo.py (vscode started directly in the root of that whole repo)
sean-mcmanus commentedon Jun 21, 2018
Peter Levi (@peterlevi) Could you file your issue with the python extension? This is the C/C++ extension.
peterlevi commentedon Jun 22, 2018
Thank you, sorry for the confusion, filed here: microsoft/vscode-python#2050
princehektor commentedon Oct 8, 2018
Sean McManus (@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 ?
sean-mcmanus commentedon Oct 8, 2018
amadhus (@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 ).
princehektor commentedon Oct 8, 2018
Sean McManus (@sean-mcmanus) : Oh my bad. I did not know that this issue was tracking a different problem.
I created another issue for this - #2628