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

Ctrl+Mouse click is still slower than using F12 to go to definition #4026

Closed
Lennon925 opened this issue Aug 6, 2019 · 6 comments
Closed
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service performance
Milestone

Comments

@Lennon925
Copy link

Cpptools version : 0.24.1

Ctrl+Mouse click is still slower than using F12 to go to definition

@sean-mcmanus
Copy link
Contributor

This is most likely because hover computation is delaying the Go to Def. Maybe there's some way to detect this and skip hover.

I assume if you hover, wait for the results, and then ctrl+click is the speed will be the same (I could double check this later).

@sean-mcmanus sean-mcmanus added bug investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service performance labels Aug 6, 2019
@sean-mcmanus
Copy link
Contributor

Actually, the Ctrl+Click also sometimes triggers a didOpen, IntelliSense update, didClose, which can also cause slowness (you can see the messages via loggingLevel "Debug").

This is a known VS Code API issue that we don't currently have a way to prevent...unless we happen to think of something creative workaround.

@Lennon925
Copy link
Author

Actually, the Ctrl+Click also sometimes triggers a didOpen, IntelliSense update, didClose, which can also cause slowness (you can see the messages via loggingLevel "Debug").

This is a known VS Code API issue that we don't currently have a way to prevent...unless we happen to think of something creative workaround.

You are right. VS Code API is very slow. Currently the speed is not the same with F12 even though hover finished. I think this is related with VS Code API because I encountered some similar issue in our own extensions.

Are there any ways to forbid the hover in code ? If so, the speed should be the same with F12.

@sean-mcmanus
Copy link
Contributor

To avoid hover when doing ctrl+click, you can quickly click the identifier before you see the hover tooltip appear, then use the cltr+click -- if you still see slowness, then it's because it's doing the additional didOpen and/or a 2nd definition when the Ctrl key is pressed -- this seems like a VS Code bug because it shouldn't do the didOpen/definition until the cursor moves and a hover is sent.

There's a thread related to this at microsoft/vscode#78453 -- we may be able to do some additional checks to skip the definition/didOpen processing when Ctrl is used.

@Lennon925
Copy link
Author

To avoid hover when doing ctrl+click, you can quickly click the identifier before you see the hover tooltip appear, then use the cltr+click -- if you still see slowness, then it's because it's doing the additional didOpen and/or a 2nd definition when the Ctrl key is pressed -- this seems like a VS Code bug because it shouldn't do the didOpen/definition until the cursor moves and a hover is sent.

There's a thread related to this at microsoft/vscode#78453 -- we may be able to do some additional checks to skip the definition/didOpen processing when Ctrl is used.

OK, Thanks for your reply.

@bobbrow bobbrow added this to the 0.26.2 milestone Oct 29, 2019
@Colengms
Copy link
Contributor

I believe this will be addressed in the next release, fixed by #4593 (and #4621). We will avoid processing didOpen for intelliSense operations that do not involve displaying the contents.

@Colengms Colengms added the fixed Check the Milestone for the release in which the fix is or will be available. label Nov 20, 2019
@michelleangela michelleangela modified the milestones: 0.26.3, 0.26.2 Dec 3, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service performance
Projects
None yet
Development

No branches or pull requests

5 participants