-
Notifications
You must be signed in to change notification settings - Fork 3.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
Faster completion support for remotes #17993
Conversation
Before this change we cancled every completion task on each keystroke. This works fine when the latency to the LSP is low, but on a remote that may be a few hundred ms away, this means you are always having to wait until the completions show. Co-Authored-By: Maan2003 <[email protected]>
supersedes #17954, so I can also push changes |
crates/editor/src/editor.rs
Outdated
// the task didn't get cancelled, so we manually return | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise completions from this
show sometimes after this.
658dd13
to
2ffca51
Compare
latency saved is time taken to type the last word before completion. |
noticed that filtering completions can be really slow in some cases from logs and looks like filter is running multiple times per keystroke |
just dropping completions future doesn't cancel the request to remote server (tested in ssh case). and rust analyzer sends huge completions response every time (~800KB) due to including docs. this delays future responses because you have to wait for x * 800KB data to be received where x is number of keystrokes |
just fyi @maan2003, @SomeoneToIgnore has recently landed a PR which significantly reduces the amount of data sent back by RA: rust-lang/rust-analyzer#18167 |
nice! |
This looks somewhat stale and outdates, so I'll close this to keep the PR queue cleaner. |
Before this change we canceled every completion task on each keystroke.
This works fine when the latency to the LSP is low, but on a remote that
may be a few hundred ms away, this means you are always having to wait
until the completions show.
This also help if language server takes a while to respond to completion requests.
Release Notes: