Skip to content
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

Investigate Delayed Go-to-Definition Behavior in Editors #34783

Open
DanielRosenwasser opened this issue Oct 28, 2019 · 7 comments
Open

Investigate Delayed Go-to-Definition Behavior in Editors #34783

DanielRosenwasser opened this issue Oct 28, 2019 · 7 comments
Assignees
Labels
Bug A bug in TypeScript Domain: Performance Reports of unusually slow behavior Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences.
Milestone

Comments

@DanielRosenwasser
Copy link
Member

Today go-to-definition across files takes a minute in large projects when a file isn't currently opened in an editor.

// a.ts
import "./b.js" // <- jump to definition on this path

// b.ts
export function foo() {
}

It's not clear why this is the case when the language service is fully initialized and program loading has occured - the file path is already known (even when declaration maps are enabled). So it seems like the editor is taking a bit longer than it needs, or go-to-definition is being blocked by some other operation (which should potentially be considered lower-priority).

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Needs Investigation This issue needs a team member to investigate its status. Domain: Performance Reports of unusually slow behavior labels Oct 28, 2019
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 3.8.0 milestone Oct 28, 2019
@DanielRosenwasser
Copy link
Member Author

See also #34843 for a real project experiencing this.

@DanielRosenwasser DanielRosenwasser removed the Needs Investigation This issue needs a team member to investigate its status. label Nov 1, 2019
@DanielRosenwasser DanielRosenwasser added the Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. label Nov 8, 2019
@DanielRosenwasser
Copy link
Member Author

I just spoke to @amcasey a bit - part of it seems to be that jumping into a file triggers a project load, but maybe that's fine.

The "I'm blocked from navigation" go-to-definition behavior that I'm more concerned about seems to come from Ctrl+Clicking or Cmd+Clicking which might trigger an immediate quick info request! That request will trigger a project load, and that project load will block the server on a "go-to-definition" request.

@DanielRosenwasser
Copy link
Member Author

@mjbvz we should chat about this one this Thursday

@mjbvz
Copy link
Contributor

mjbvz commented Nov 18, 2019

@DanielRosenwasser Can you also test this in the latest VS Code insiders build to confirm this is still happening. I checked in a fix the hover issue @amcasey mentioned last week but am not sure if it would also fix this

@amcasey
Copy link
Member

amcasey commented Dec 6, 2019

I think we decided that one or both of #35114 and #35115 were our best bet for resolving this.

@amcasey
Copy link
Member

amcasey commented Jan 25, 2020

This is a tracking issue not aimed at any particular milestone.

@amcasey amcasey removed this from the TypeScript 3.8.1 milestone Jan 25, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Sep 11, 2020
@amcasey
Copy link
Member

amcasey commented Nov 17, 2022

I'm not sure this is tracking anything specific.

@amcasey amcasey assigned RyanCavanaugh and unassigned amcasey Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Performance Reports of unusually slow behavior Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences.
Projects
None yet
Development

No branches or pull requests

4 participants