Skip to content

Language servers take a long time to start up when using a slow internet connection #42360

@bennetbo

Description

@bennetbo

Summary

Language servers take a long time to start up when using a slow internet connection

Description

A user reported this at the office hours. When using a slow internet connection, it takes a long time to startup language servers.
On screen I was able to observe that "Checking for updates to [LSP] ..." showed up for a long time. Seemingly we are waiting for the update check to complete before starting the LSP.

Steps to reproduce:

  1. Use a slow/throttled internet connection
  2. Restart Zed
  3. Open a file that triggers Zed to startup a language server (e.g. Rust)
  4. Wait for language server to start
  5. Observe that "Checking for updates to [LSP] ..." is showing up in the lower left
  6. Until that status message disappears the LSP is not running 💥

Expected Behavior: If the LSP is already installed it starts-up instantly and the update (if there is one) is downloaded in the background
Actual Behavior: LSP only starts after checking for updates is completed

I can see two ways to solve this:

  • Use a short timeout (e.g. 3 seconds) to check for the latest version
  • Immediately start the LSP and run the update-check in the background

Zed Version and System Specs

Any Zed version

If applicable, attach your Zed.log file to this issue.

Metadata

Metadata

Assignees

Labels

area:language serverAn umbrella label for all language serversarea:performanceFeedback for performance issues, speed, memory usage, etc

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions