-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Optimization: Cancel pending futures on new LSP requests. #3525
Comments
This definitely isn't a trivial thing to implement. Ideally, we would be able to take advantage of the cancelRequest part of the LSP spec to drop any current work. Unfortunately, There is also a really good discussion here where |
Here you can see just how backed up the server can get in it's current state. Screen.Recording.2023-04-10.at.11.17.00.am.mov |
A good stress test for this is to rename the If we implement this correctly, each subsequent |
This was mostly addressed in #5429 We can now bail out of compilation if a newer did_change notification message is received |
The language server should cancel any pending futures that have yet to yield a result if a new request comes in from the client. For example, on every did_change event, we should stop compilation and start again immediately.
As this event happens on every keystroke, this optimization in itself should lead to a drastic speed improvement.
The text was updated successfully, but these errors were encountered: