-
Notifications
You must be signed in to change notification settings - Fork 137
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
Super-slow, character-by-character diagnostics since 0.29.3 #1317
Comments
Same problem on neovim. Its been like it for a long while now if not forever.
I also find that typing suggestions only work occasionally, normally its when the LSP isn't behaving slow. Not sure if its related or not. The LSP is 100% started when typing suggestions don't work as its running really slow and diagnostics are 'working'. Until now I've just put up with it but I don't know if this is a problem with Neovim or this LSP although I do use ~10 other language servers for varying things and this is the only one that is barely usable - the others work great. If theres anything I can do ie logs to help then please let me know. I also have to pipe neovim lsp logs to /dev/null due to the amount of noise created by the Terraform LS which is probably another issue... |
We know this has been a frustrating experience and appreciate your understanding while we gathered feedback and examples to diagnose this issue. We've created hashicorp/vscode-terraform#1557 as a central place to see updates on what we are doing to address performance issues in terraform-ls in both the short and long term and pinned it to the repo. We'll be adding more detail there as we implement fixes. As we work on this we'll be recording the content and then closing the individual issues so that everyone has one place to look at instead of searching for individual tickets for updates. |
Thanks for the update, and I'm happy to test out the opt-in performance profiling when it's ready, or just recompile Though for this particular issue, I don't think it's a question of people's workflows or the size of their projects or anything architectural, I think it's just a regular ole bug. Like "something blocking the main thread and doing redundant network requests" or similar. As @rlees85 wrote, this is "make a cup of tea" slow even on fairly run-of-the-mill Terraform projects. Plus, empirically the issue doesn't exist in Beyond this specific bug, I think something as straightforward as debounce ("don't run this analysis until Xms since the last keystroke") or cancelling existing analysis when new strokes come in could be a "quick" fix here, though I've never written an LSP and have no sense of what the best practices are here. |
I only pinpointed the bug to be introduced between 0.29.2 and 0.29.3, but as @bcspragu pointed out, there are only 43 commits between the two releases. I'm not familar with Golang, but someone with Golang expertise can use It's not a performance improvement that is needed, it's a bug fix. |
your not wrong... I'm not a go expert really but I know enough to compile terraform-ls from source. Finding free time is awkward but i'll do it if no-one beats me to it. I can confirm 0.29.2 also fixes the problem for me though which is strange as I thought the problem has been ongoing for ages. |
Happy to give this a test run, but it looks like no release since v0.30.1 contains compiled release artifacts. Thanks for your work on this! |
We changed the release process after You can find and download the artifacts for Thanks for trying it out! |
Ah yes, apologies for not RTFM. I'm running Looking at your linked fixes, I'm guessing that everyone in this thread is using non-VS Code (which may have different LSP behavior) editors and HDD storage (slow reads from disk). Thanks again for sorting this out! |
I tried 0.31.5 release and I can confirm that the super-slow issue has been resolved! Thank you for the bug fix! |
Didn't need to write Terraform for a while but yes all god - thanks very much!! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Language Server Version
0.31.3 (actually anything >= 0.29.3)
Terraform Version
1.2.9
Client Version
Neovim 0.9.1
Terraform Configuration
Steps to Reproduce
248203620-12e2ed5c-eb6f-4020-b654-b09f8641d03c.mp4
The clip was recorded with this minimal
init.vim
config:Expected Behavior
The diagnostics appear smoothly.
Actual Behavior
The diagnostics appear slowly.
Gist
https://gist.github.com/wzyboy/248e70eb2d6a6f105354b7adca07ee32
Workarounds
I tried downgrading terraform-ls to earlier versions. With some bisecting, the last known good version is 0.29.2. Since 0.29.3, the slowness starts.
References
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: