Skip to content

ep: Cap identifiers for LSP context retriever - #58539

Merged
osyvokon merged 1 commit into
mainfrom
ep-cap-lsp-symbols
Jun 4, 2026
Merged

ep: Cap identifiers for LSP context retriever#58539
osyvokon merged 1 commit into
mainfrom
ep-cap-lsp-symbols

Conversation

@osyvokon

@osyvokon osyvokon commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 4, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 4, 2026
@osyvokon
osyvokon added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 569511a Jun 4, 2026
43 checks passed
@osyvokon
osyvokon deleted the ep-cap-lsp-symbols branch June 4, 2026 14:33
@aviatesk

aviatesk commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Glad to see adding the cap here. This is definitely an improvement.

One concern is that even with this cap, the current implementation can still issue up to roughly 64 definition-related LSP requests at the same time per context refresh, which means edit predictions currently assume that all language servers can handle bursts of definition/typeDefinition requests cheaply, but that is not true for every server. Because of that, I think it would be better if this cap were configurable. Alternatively, if 32 is considered universally safe, we would need to validate that experimentally across language servers, but that does not seem very realistic.

Relatedly, given this constraint, I’d also like to see #56055 move forward. That PR fixes a logic bug where users who have disabled edit predictions due to this LSP server burst issue can still accidentally trigger edit-prediction-related definition request burst by using the "go to diagnostic" command.

@osyvokon

osyvokon commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

edit predictions currently assume that all language servers can handle bursts of definition/typeDefinition requests cheaply, but that is not true for every server.

@aviatesk, that's a good point. I'll think what we can do here. As the first step, we'll run an LSP benchmark and/or add relevant telemetry. Then we can add an allow list for servers where typeDefinition is cheap enough. Or maybe cap LSP requests dynamically based on actual latency.

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 staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants