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

Faster completion support for remotes #17993

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

maan2003
Copy link
Contributor

@maan2003 maan2003 commented Sep 18, 2024

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:

  • Improved perceived latency of completions over the network

ConradIrwin and others added 2 commits September 18, 2024 14:13
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]>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 18, 2024
@maan2003
Copy link
Contributor Author

supersedes #17954, so I can also push changes

Comment on lines 4345 to 4346
// the task didn't get cancelled, so we manually return
return;
Copy link
Contributor Author

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.

@maan2003
Copy link
Contributor Author

latency saved is time taken to type the last word before completion.

@maan2003
Copy link
Contributor Author

maan2003 commented Sep 18, 2024

noticed that filtering completions can be really slow in some cases

from logs
[crates/editor/src/editor.rs:1360:9] start.elapsed() = 181.814619ms

and looks like filter is running multiple times per keystroke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants