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
Other extensions you installed (and if the issue persists after disabling them):
A clear and concise description of what the bug is.
To Reproduce
'Go to symbol in workspace' is very slow and doesn't support fuzzy search . This is in comparison to Sublime Text on the same project (I recently started using VS Code)
However 'Go to symbol in file' is super quick and does support fuzzy search.
Is there a way to extend this functionality to the 'Go to symbol in work space' as well ?
Expected behavior
'Go to symbol in work space' is fast and supports fuzzy search (like Sublime)
What do you mean by "doesn't support fuzzy search"? Go to Symbol in workspace and file should be identical in respect to the fuzzyiness.
Also, is Go to Symbol in Workspace acceptably fast for you the 2nd time it is done, or is the problem just the 1st time it's run (which we do an expensive caching operation). We had a plan to do the expensive caching computation in the background after extension loading instead of on the 1st invocation of Go to Symbol in workspace.
Oh. Maybe i used the wrong term to describe my problem.
When i try to search for a symbol in a given file, i start typing the word and VS code already starts showing all possible combinations of the word/symbol. It doesn't have to be the starting word of the symbol - it even works for a word that is part of the symbol(e.g. My_Function_Get()- i can search for either 'My' or 'Function' or 'Get)'
When i try to search for the same symbol across the entire work space, i dont see VS code showing me any possible combinations or all symbols with that word in it. I have to type in the word and wait for 4-5 seconds to see the results. First time or second time, i same the same sluggishness.
I hope i was able to describe the issue that i am seeing.
I'm seeing the same fuzzy behavior with workspace symbols:
The most likely explanation is that your search string is hitting our limit of 1000 results, causing the fuzzy results your expecting to not appear.
It sounds like you're repeatedly seeing 4-5 seconds for workspace searching -- this not expected, unless possibly if your machine is unusually slow. I'm seeing < 2 seconds with 25k files, 200 MB database. Is there anything unsual about your scenario, such as remote file access? How big is your database file? You can easily see the size of it via setting the databaseFilename to something like "${workspaceFolder}/.vscode/vc.db".
I dont think its the '1000' results case since the symbol i am searching for only appears in about 10-15 places.
Also its not 4-5 seconds every time. Sometimes i see the results in around 2-3 seconds, but it doesn't start auto completing instantly like it does with "Go to symbol in file". I have to type the symbol and wait for a few seconds for the results to show up. Also i coming from Sublime Text, therefore i am trying to get the same functionality here. This is not a problem as such, just that it would be great if the search was faster.
Also,i created the database file but it looks like it is around 320 MB and my project has around 10000 files. Weird thing is that the size keeps increasing. The db file size started out at around 50 MB and progressively increased to around 320 MB. Is this expected ?
Also there is no remote file access going on here and my machine is not that slow , it is an i7 clocked at 3.6Ghz.
If the database size is still increasing (and there's a database icon in the bottom right) that means symbols are still being parsed in your workspace -- I don't see that causing additional slowness though.
The fast "auto complete" behavior is when the filtering is done by VS -- for Go to Symbol in File, we ignore the filter text and just send all the symbols in the doc, so the text that is added is filtered by VS Code (quickly). For workspace symbols, every text entered causes us to re-query the database, which is "slower".
The database file size is finally 387MB. Not increasing beyond that.
I understand your explanation about the "auto complete" option only being enabled for the "Go to symbol in file" and not the "Go to symbol in work space". Therefore it is slightly slower. Totally get it.
But i am going to ask anyway :)
Is there some way we can add the same auto complete functionality to the "Go to symbol in workspace" as well ? Some setting i can change to do that ?
We would have to query and send all the symbol in the workspace to VS Code, which would probably be too many. We need to improve our in-memory symbol caching/processing to give faster results.
I have this exact same issue, having switched from Sublime to VS Code recently. Aside from being an order of magnitude slower than Sublime's symbol search, I've found it pretty difficult to work with in general.
It doesn't seem to begin searching until after I've stopped typing, which I think really contributes to the sluggish feel of the search.
Regarding fuzzy search, I routinely search symbols while excluding punctuation in names (specifically underscores). In the example above, searching "empty_range" is found, but "empty range" is not.
Another issue I have in my workspace is that I have many symbols that have identical names in many different files. Sublime, when it finds a name conflict, presents a list of the files it found matches in and lets the user choose which file they wanted. VS Code seems to pick a file at random and present that as the only option, leading me to have to cancel that search and do a file search instead to get to the file I wanted and THEN do a symbol search within that.
I like VS Code otherwise, and most of my office has switched over to it in the last few weeks so I want to stick with it. But symbol search is a big part of how I interact with my code and it's been a big hindrance in getting me want to use it.
John Young (@jtyoung) The picking a file at random for symbol search sounds like a bug. Do you have any more repro info for that? We only show the files with definitions of the symbol and not all references. We're working on the Find All References feature currently. I usually use Go to Definition/Declaration or file search and not symbol search.
Sean McManus (@sean-mcmanus) They are indeed in the same workspace, but I just realized I'm commenting on the C++ tools repo. I followed a few other issues about symbol/file search that linked me here, assuming I was still in the general VS Code repo. I am using Python, so my issues are probably unrelated to anything here.
Sorry for the misunderstanding, thanks for the replies.
Been a while since there have been updates on this (over half a year). When can we expect this to be fixed?
My specific use case is that I have a C++ code base that uses CMake. Should there be some intellisense cache that VS Code creates when I open a folder? Shouldn't it scan and make all symbols quickly searchable when I open a folder? This is basically how Visual Studio IDE works right?
On a side note, why does the "Type to search for symbols" box disappear, effectively canceling the ongoing search operation, when I simply click to do work in another window while I wait for it to finish? That means I have to arbitrarily sit there and wait for it to finish instead of doing other things in parallel until I see results appear.
The "Type to search for symbols" UI behavior is controlled by VS. Find All References has a better progress UI with preview abilities. Maybe we could improve the symbol search somehow as well with a better progress indicator like we did for Find All References.
We had a plan to do the expensive caching computation in the background after extension loading instead of on the 1st invocation of Go to Symbol in workspace.
I'm also facing the same problem. Would be glad to see this implemented.
Activity
princehektor commentedon Oct 8, 2018
Sean McManus (@sean-mcmanus) : Here you go.
sean-mcmanus commentedon Oct 9, 2018
What do you mean by "doesn't support fuzzy search"? Go to Symbol in workspace and file should be identical in respect to the fuzzyiness.
Also, is Go to Symbol in Workspace acceptably fast for you the 2nd time it is done, or is the problem just the 1st time it's run (which we do an expensive caching operation). We had a plan to do the expensive caching computation in the background after extension loading instead of on the 1st invocation of Go to Symbol in workspace.
princehektor commentedon Oct 9, 2018
Oh. Maybe i used the wrong term to describe my problem.
When i try to search for a symbol in a given file, i start typing the word and VS code already starts showing all possible combinations of the word/symbol. It doesn't have to be the starting word of the symbol - it even works for a word that is part of the symbol(e.g. My_Function_Get()- i can search for either 'My' or 'Function' or 'Get)'
When i try to search for the same symbol across the entire work space, i dont see VS code showing me any possible combinations or all symbols with that word in it. I have to type in the word and wait for 4-5 seconds to see the results. First time or second time, i same the same sluggishness.
I hope i was able to describe the issue that i am seeing.
sean-mcmanus commentedon Oct 9, 2018
I'm seeing the same fuzzy behavior with workspace symbols:
The most likely explanation is that your search string is hitting our limit of 1000 results, causing the fuzzy results your expecting to not appear.
It sounds like you're repeatedly seeing 4-5 seconds for workspace searching -- this not expected, unless possibly if your machine is unusually slow. I'm seeing < 2 seconds with 25k files, 200 MB database. Is there anything unsual about your scenario, such as remote file access? How big is your database file? You can easily see the size of it via setting the databaseFilename to something like "${workspaceFolder}/.vscode/vc.db".
princehektor commentedon Oct 9, 2018
I dont think its the '1000' results case since the symbol i am searching for only appears in about 10-15 places.
Also its not 4-5 seconds every time. Sometimes i see the results in around 2-3 seconds, but it doesn't start auto completing instantly like it does with "Go to symbol in file". I have to type the symbol and wait for a few seconds for the results to show up. Also i coming from Sublime Text, therefore i am trying to get the same functionality here. This is not a problem as such, just that it would be great if the search was faster.
Also,i created the database file but it looks like it is around 320 MB and my project has around 10000 files. Weird thing is that the size keeps increasing. The db file size started out at around 50 MB and progressively increased to around 320 MB. Is this expected ?
Also there is no remote file access going on here and my machine is not that slow , it is an i7 clocked at 3.6Ghz.
sean-mcmanus commentedon Oct 9, 2018
If the database size is still increasing (and there's a database icon in the bottom right) that means symbols are still being parsed in your workspace -- I don't see that causing additional slowness though.
The fast "auto complete" behavior is when the filtering is done by VS -- for Go to Symbol in File, we ignore the filter text and just send all the symbols in the doc, so the text that is added is filtered by VS Code (quickly). For workspace symbols, every text entered causes us to re-query the database, which is "slower".
princehektor commentedon Oct 9, 2018
The database file size is finally 387MB. Not increasing beyond that.
I understand your explanation about the "auto complete" option only being enabled for the "Go to symbol in file" and not the "Go to symbol in work space". Therefore it is slightly slower. Totally get it.
But i am going to ask anyway :)
Is there some way we can add the same auto complete functionality to the "Go to symbol in workspace" as well ? Some setting i can change to do that ?
sean-mcmanus commentedon Oct 9, 2018
We would have to query and send all the symbol in the workspace to VS Code, which would probably be too many. We need to improve our in-memory symbol caching/processing to give faster results.
princehektor commentedon Oct 9, 2018
Ah okay. I was hoping to get the same functionality that i had while using Sublime (on the same project/work-space)
No big deal. Hoping that you guys can add this in the future.
Thanks for your help.
jtyoung commentedon Oct 23, 2018
I have this exact same issue, having switched from Sublime to VS Code recently. Aside from being an order of magnitude slower than Sublime's symbol search, I've found it pretty difficult to work with in general.
It doesn't seem to begin searching until after I've stopped typing, which I think really contributes to the sluggish feel of the search.
Regarding fuzzy search, I routinely search symbols while excluding punctuation in names (specifically underscores). In the example above, searching "empty_range" is found, but "empty range" is not.
Another issue I have in my workspace is that I have many symbols that have identical names in many different files. Sublime, when it finds a name conflict, presents a list of the files it found matches in and lets the user choose which file they wanted. VS Code seems to pick a file at random and present that as the only option, leading me to have to cancel that search and do a file search instead to get to the file I wanted and THEN do a symbol search within that.
I like VS Code otherwise, and most of my office has switched over to it in the last few weeks so I want to stick with it. But symbol search is a big part of how I interact with my code and it's been a big hindrance in getting me want to use it.
sean-mcmanus commentedon Oct 23, 2018
John Young (@jtyoung) The picking a file at random for symbol search sounds like a bug. Do you have any more repro info for that? We only show the files with definitions of the symbol and not all references. We're working on the Find All References feature currently. I usually use Go to Definition/Declaration or file search and not symbol search.
2 remaining items
jtyoung commentedon Oct 24, 2018
Sean McManus (@sean-mcmanus) They are indeed in the same workspace, but I just realized I'm commenting on the C++ tools repo. I followed a few other issues about symbol/file search that linked me here, assuming I was still in the general VS Code repo. I am using Python, so my issues are probably unrelated to anything here.
Sorry for the misunderstanding, thanks for the replies.
hungys commentedon Nov 3, 2018
+1
In a large project, I can not even get any result from "Go to symbol in workspace".
AndreiD commentedon Dec 26, 2018
it's slow as hell in Golang as well. anyone knows how to fix this
sean-mcmanus commentedon Dec 26, 2018
Dan Ξ (@AndreiD) Our extension doesn't work with Golang, only C/C++.
AndreiD commentedon Dec 27, 2018
julian-poidevin commentedon Apr 9, 2019
Sean McManus (@sean-mcmanus) 👍 +1 : "Go to symbol in workspace" is unusable in large projects.
rcdailey commentedon Aug 16, 2019
Been a while since there have been updates on this (over half a year). When can we expect this to be fixed?
My specific use case is that I have a C++ code base that uses CMake. Should there be some intellisense cache that VS Code creates when I open a folder? Shouldn't it scan and make all symbols quickly searchable when I open a folder? This is basically how Visual Studio IDE works right?
On a side note, why does the "Type to search for symbols" box disappear, effectively canceling the ongoing search operation, when I simply click to do work in another window while I wait for it to finish? That means I have to arbitrarily sit there and wait for it to finish instead of doing other things in parallel until I see results appear.
sean-mcmanus commentedon Aug 17, 2019
Robert Dailey (@rcdailey) The work hasn't been scheduled.
We added Find All References (https://github.com/microsoft/vscode-cpptools/releases/tag/0.25.0-insiders2) -- that might give a better experience? It requires that all the files be configured correctly for IntelliSense though, unless the symbol search.
The "Type to search for symbols" UI behavior is controlled by VS. Find All References has a better progress UI with preview abilities. Maybe we could improve the symbol search somehow as well with a better progress indicator like we did for Find All References.
wgqimut commentedon Aug 26, 2019
Sean McManus (@sean-mcmanus) Actually "Go to symbol in workspace" fuzzy search is not good as "Go to file".
"Go to file" can do this:

"Go to symbol in workspace":


quotalinkshould have results like:sean-mcmanus commentedon Aug 26, 2019
elbsmart (@wgqimut) We're tracking fuzzy symbol search with #2751 .
magdumnikhil commentedon Dec 11, 2019
I'm also facing the same problem. Would be glad to see this implemented.
rcdailey commentedon Jun 9, 2020
Why was this closed?