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

Large diagnostic sets may throttle LspServerWriter thread #18961

Open
osiewicz opened this issue Jan 17, 2025 · 1 comment · May be fixed by #18972
Open

Large diagnostic sets may throttle LspServerWriter thread #18961

osiewicz opened this issue Jan 17, 2025 · 1 comment · May be fixed by #18972
Labels
C-bug Category: bug

Comments

@osiewicz
Copy link
Contributor

osiewicz commented Jan 17, 2025

Hello,
While working on reducing end-to-end-latency of diagnostics for Zed I've noticed that LSP message payloads for diagnostics (and other messages too I suppose) are getting dropped by LspServerWriter. This showed up for me in RA profiles while working with a dummy project with 8k diagnostics in a single file (linked below).
This is not really a bug, more so a query - would it be worthwhile to try to drop messages in background thread to keep the LspServerWriter responsive? Based on few comments across the codebase this seems to be intent.

rust-analyzer version: latest main (cd199ea)
rustc version: rustc 1.82.0 (f6e511eec 2024-10-15)
editor or extension: Zed
repository link: repro

@osiewicz osiewicz added the C-bug Category: bug label Jan 17, 2025
@Veykril
Copy link
Member

Veykril commented Jan 18, 2025

That does sound reasonable given how complex and big diagnostics can get (at least the ones we fetch from cargo)

osiewicz added a commit to osiewicz/rust-analyzer that referenced this issue Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants