-
Notifications
You must be signed in to change notification settings - Fork 182
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
Goto Symbol boots slowly on large files, first characters are inserted in the code as a result #2346
Comments
Note that we have logic for preventing keys from modifying the view when document symbols are requested but maybe some recent changes opened some timing window where this doesn't apply. Maybe due to extra |
I guess it might happen because we still erase that setting directly when the response arrives at Line 190 in 2e06833
window.run_command . Maybe we can move that line somewhere into the input handler class. But I'll have to take a closer look later, not that we possibly miss some code path in that case where the setting accidentally won't get erased.
It might also be possible now to catch the typed input during that time and insert it into the text field when it opens, via |
When testing on a server (tsc) that is still initializing I can easily trigger a case where documentSymbols will take a long time to respond but in that case I can't reproduce the issue (the input is blocked in that case). So I guess it's as you are saying that it's the period between when the response arrives and when the list is shown that is problematic. |
I was able to reproduce it and I already have a fix for it, Edit: discarded the capturing idea for now, because I think for that we would need an individual command for each key then. |
I didn’t have a chance to answer before, but it’s great that you were able to fix this! Thanks! |
So the bug that the text accidenatlly gets inserted into the file is fixed now on main, but I'm still investigating why the new Goto Symbol overlay is a little bit slower as before. I tried it first with the largest Julia file I found (3000+ lines) and with a lot of symbols in it (~ 500k characters in the response payload) and the overlay still opens basically instantly, before I can move my fingers from the key binding back to the normal typing position. But now I tested with a huge JSON file with 1.3M character response payload and there is indeed a noticeable delay before the overlay opens. The overlay was rewritten using a different Sublime API method (ListInputHandler instead of However, I've got two ideas how to possibly improve the performance:
I will test if those points make any difference. |
Describe the bug
LSP Goto Symbol suddenly started being a little slower to "boot", and I end up littering my code with unwanted characters as a result: I hit Ctrl-R to open LSP Goto Symbol, and immediately start typing the name of the function I’m looking for, as I always do, but now it fires a little bit late and the first character of my function name is inserted in the code.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I’m not sure which is the main issue, but both would be good to fix I guess:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: