-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Diagnostics toggle warning triggers high CPU usage and LSP becomes irresponsive #18658
Comments
I was able to hang Zed Preview 0.156.0
Wait till gopls loaded and then tried to click on the diagnostic panel and it hung. My log included the following:
I then killed and reopened Zed. It got a little further, showing me some number of errors (23?) which I was able to click into the diagnostics panel and briefly see in the multibuffer before it hung again with:
On subsequently opens Zed Preview was stable and responsive and I was able to gopls navigations (go to definition, etc) to jump around without issue. If Zed isn't hanging for you, you might look at the LSP logs (ctrl-shift-p, "debug: show language server logs" and drill down to go-pls. |
Ok, so I think this is the classic case of us getting bogged down in open buffers (kinda like #19022). This is a really long-winded way of saying that we should probably not register a file for which we didn't get any diagnostics. |
@osiewicz Would it also make sense to not send the |
@filipwiech yes! we've had a discussion and we want to make multibuffers a bit more lightweight, which would involve not sending out didOpen for excerpts in mutlibuffer that were not interacted with. I don't have a timeline for this change, but we do want to make it (and land other improvements you've mentioned as well). |
This should be improved by |
Check for existing issues
Describe the bug / provide steps to reproduce it
When using zed with a fairly big Go codebase (https://github.com/juju/juju), and having a lot of warning diagnostics and a few error diagnostics, if I run the command
diagnostics: toggle warnings
then the editor gets to high CPU usage and the LSP becomes irresponsive.This is what Zed's logs show:
in a loop.
There are no logs in gopls even though I added the
-logfile
flag.Environment
Zed: v0.155.2 (Zed)
OS: Linux Wayland ubuntu 24.04
Memory: 15.3 GiB
Architecture: x86_64
GPU: Intel(R) UHD Graphics 620 (WHL GT2) || Intel open-source Mesa driver || Mesa 24.0.9-0ubuntu0.1
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.Zed.log
The text was updated successfully, but these errors were encountered: