-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Return all symbols in navto for empty string pattern #55550
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
Conversation
Does navto do an after-the-fact filter today? Or does it filter as it aggregates symbols? Also curious if you've tried this on slightly bigger codebases like VS Code or TypeScript itself (for both Go To Symbol in Editor and Go To Symbol in Workspace). |
Do you mean if vscode is going to filter the navto results TS Server sends? If so, it doesn't. I'll wait to merge this until we decide on the changes needed on the editor side. |
We might also want to consider doing #48194, but I don't know what was discussed/decided about it the last time it was brought up. |
@typescript-bot perf test this |
Heya @gabritto, I've started to run the regular perf test suite on this PR at 8d43af7. You can monitor the build here. Update: The results are in! |
@gabritto Here they are:
CompilerComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
StartupComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
I just remembered the benchmark sends a navto request with some pre-defined string... So the perf tests are not relevant here. But I tested this locally and there isn't a delay on the vscode codebase, but for the TS codebase there's a ~1.5s delay between the command and the results showing up. |
No, I was asking if it's the case that running navTo with |
It'll walk across all files in all the projects, collect all named declarations (if they haven't been computed yet), and then look at every named declaration to see if it matches |
Update: I did some perf testing locally of how long it takes for TS Server to process navto request in the TS codebase with no search of empty string vs. a single letter "a" vs. "node". The first ever navto request takes a long time (0.5s for me), because the named declarations of each file are not cached yet, but other than that:
So overall I think this looks acceptable as-is. At first I thought this empty string search was a bit slow because I was testing it on vscode directly, and there seems to be an added delay on vscode that is at times inconsistent, but at least to me it shows up not only for the empty string search, but for other navto searches as well. So I think this is no worse than what we have today. |
Fixes #55483.