-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
rust-analyzer: diagnostics can take a long time to be updated #23566
Comments
@JosephTLyons I don't think that implementing the rpc routines would be an end-user breaking change, right? It's should just improve the perceived responsiveness |
To be fair some of this (I think) is on RA side; when I've profiled my lovely 8k-diag use case (https://gist.github.com/osiewicz/89113b481504c719dc330ed02c51b4af) I've noticed that while building it (and emitting all the errors) takes ~3s whereas it takes RA 18s to emit all of them. I think what you're suggesting is sound and a good way to go about this tbh |
Sorry - the "breaking-change" label was unintentional. |
See #19230 I think, some form of a breaking change may happen if no "related files" will be reported when pulling for diagnostics: now, r-a pushes all workspace-related diagnostics, including |
@SomeoneToIgnore from what I can tell, vscode still invokes I don't think that this should replace what's already implemented for triggering workspace diagnostic updates, but implementing this for the active document seems to be a way to shorten the feedback loop for the most relevant diagnostics, and any |
Check for existing issues
Describe the bug / provide steps to reproduce it
VSCode proactively queries RA for diagnostics in the active text document via a
textDocument/diagnostic
rpc rather than waiting for atextDocument/publishDiagnostic
notification after a full workspace check, which can significantly reduce the latency between code edits and useful diagnostics in crates deep in the dependency graph.I've attached the trace logs from vscode to show that the latency in the
textDocument/diagnostic
rpc request/response loop after atextDocument/didChange
notification from the client, which shows a <1s response, where Zed can have a diagnostic latency of >10s on my hardwarevscode-ra-log.txt
Zed Version and System Specs
Zed: v0.171.0 (Zed Dev 8b8ca795f459f5b911b6d7dfcdb89cdca01f1781)
OS: Windows 10.0.19045
Memory: 63.8 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 3080 Ti Laptop GPU || NVIDIA || 538.92
If applicable, add screenshots or screencasts of the incorrect state / behavior
No response
If applicable, attach your Zed.log file to this issue.
No response
The text was updated successfully, but these errors were encountered: