-
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
Ctrl+Mouse click is still slower than using F12 to go to definition #4026
Comments
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). |
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. |
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. |
Cpptools version : 0.24.1
Ctrl+Mouse click is still slower than using F12 to go to definition
The text was updated successfully, but these errors were encountered: