-
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
1.19.3 (Insiders build) Performance Enhancement Experiment: Go To Symbol #11557
Comments
Test Result: |
@Shaka0723 - So, what's happening here is that the direct matches are picking up matches (so, if you search for Given that |
Performance wise, seems much better to me 🎆 . Actually usable now. Its about 1s delay before seeing matches in a million line C++ codebase, whereas before it was maybe 30s to a minute. Quality of results - making sense to me. |
I don't think this is a extreme example. also, when I input dsmc, doSomethingMoreComplicated fileted but do_something_more_complicated not. - quite strange. Simply speaking, I am expecting the performance and experience of the search algorithm to be the same as for symbol searches in files - case-insensitive, fuzzy. |
one more word, can let user decide the characters number range but not mandatorily set 16 max by cpptools?
|
@fearthecowboy Should we (or the user) file a feature request to add a setting for the max fuzzy character distance? But if that setting were added, it seems like we would also need to add a setting for the fuzzy search timeout, otherwise setting the distance too high could just result in the timeout getting hit, resulting in no fuzzy symbols still. |
I would like to ask if there will be support for fuzzy searches exceeding 16 characters in the future,or this plugin will just support 0~16 characters |
@likui1123 With https://github.com/microsoft/vscode-cpptools/releases/tag/v1.20.0 , i.e. the fuzzy character limit has increased to 28. |
I tried 1.20.0, it has been better than before. but why not let user decide fuzzy character limit? |
1.19.3-Insiders
Performance Enhancement Experiment: Go To SymbolWith the
1.19.3
release of the C/C++ extension, significant changes have been made to the 'Go To symbol in the workspace'(this addresses several issues including #4934 #7908 #7914)
This implementation is the result of an extensive deep dive investigation that I did into the performance of VSCode,
and crafting a brand new design for implementing features such as this. As such, it is an experimental feature, and
we are looking for some serious feedback on its performance and accuracy.
Call to Action
We're looking for feedback on the new experimental implementation of 'Go To symbol in the workspace' (ctrl-T) for VSCode,
both positive and otherwise - If you're able to test the new implementation and provide feedback, it would be greatly
appreciated.
When upgrading to the
1.19.3
insiders release, you may randomly be assigned to be either in the experiment group(using the enhancement) or in the control group (no enhancement).
If you are not in the experiment group, you can explicitly opt-in the experiment group by adding the following setting
into your
settings.json
file (either globally or in the workspace):Once you have the setting in place, you can test the new implementation by using the 'GoTo symbol' in VSCode (Ctrl-T)
Any feedback that you can provide would be greatly appreciated. Feel free to post comments in this thread with any
experience you wish to share.
Feedback
If you have feedback (positive or otherwise) on the new implementation, please post it in this thread.
We are looking for feedback on the following:
Performance - does the search feel sufficiently fast?
Quality - Are you getting to the symbol you're looking for easily?
When giving feedback - the more details you can give, the better we can hone the results.
Details of the new implementation
The new implementation of 'GoTo symbol in the workspace' (ctrl-T) for VSCode uses an entirely new algorithm for searching
for symbols in the workspace. It is using a full-text-search index of symbols that is maintained on the fly, which
allows us to quickly find symbols using a variety of search methods.
The search is handled through several different queries, starting with finding very literal matches, and progressively
moving to very fuzzy matches. The result is that it should return very relevant results in a fraction of the time that
it was previously.
General search behavior
VSCode orders the results by its own relevance algorithm, so the most relevant results should be at the top.
VSCode filters the search results to only show results where all the characters in the input are found in the fully
qualified symbol name, and in the order they are specified, so a search with
teh
will not returnthe
, butth
will. Generally, the more characters that are specified, the more narrow the results should be.
The maximum number of symbols returned from a search is
10000
- this is a reasonable limitation, both in orderto keep the number of results to a useful maximum, and to not have it take excessively long to return results.
Symbol matching is generally case-insensitive, so should work regardless of the case of the input, but if there are
too many results because of fuzzy matching, it will tend to be more accurate when casing matches the expected symbol.
Symbols can now be searched for in a specific scope (class or namespace) using
::
in the input. For example,foo::bar
will search for symbols namedbar
in the scope offoo
. This is useful for finding symbols that havecommon names, but are in different scopes. For example,
foo::bar
will findbar
infoo
, but notbar
inbaz
.The scope itself can be searched, so
foo::
will find symbols in any scope containingfoo
--foo::bar
,bar::foo::baz
,foo_bar::baz
, etc. This is useful for finding all symbols in a specific namespace. In a largeworkspace, this may return a large number of results.
The following kinds of searches are performed in order:
Direct matches
Searches for symbols that match the input, or where the symbol has words that start with the input.
foo
- will matchfoo
andfooBar
,bar_foo
,bar_foo_baz
fooBar
- will matchfooBar
andfooBarBaz
,bar_fooBarz
Substring search
Searches for symbols that contain the input as a substring anywhere in the symbol name.
foo
will matchtofoo
Abbreviations or word searches
Searches for symbols that match the input as an abbreviation of a given, or contains the words in the input.
fooBar
will matchfooBar
,foo_bar
,bizFooBar
, andbiz_foo_bar
fb
will matchfooBar
andfoo_bar
dsmc
will matchdoSomethingMoreComplicated
as well asdo_something_more_complicated
fb::dsmc
will matchfooBar::doSomethingMoreComplicated
Fuzzy searching
Searching with letters that are in the symbol name in the order they appear, but not necessarily adjacent. This starts
with closer matches and progressively gets fuzzier, but will stop searching when it reaches a threshold of time.
vbs
will matchaverybigsymbol
bip::vbs
will matchbiginformationscope::averybigsymbol
The text was updated successfully, but these errors were encountered: