Open bcspragu opened 1 week ago
Hi @bcspragu,
Thanks for the report and sorry you're experiencing this slow performance.
Did this happen with the previous version of the language server, or did 0.35.0 introduce it?
Great question! This is a new machine/user account/project, so I've only used 0.35.0
on it.
I just installed v0.34.3
to test it out, and v0.34.3
works as expected - I get instant completions and error checking. Flipping back to v0.35.0
and things break again, slow to the point of me not even being sure it was running. So definitely some regression in the most recent version.
I'll use v0.34.3
as a workaround for now!
EDIT: Not that I think it matters, but the v0.35.0
version is coming from the Arch Linux User Repository package, and I installed v0.34.3
from Hashicorp directly. Can test v0.35.0
directly from Hashicorp if that's useful
Since OP only had a fresh install, I'll chime in and say that I have the same issue, and first started experiencing this same behavior a few weeks ago, which roughly coincides with my automatic upgrade to v2.33.0 of the Terraform Extension for VS Code, which includes v0.35.0 of terraform-ls. The issue seems to be eliminated by reverting to v0.34.3, by way of installing v2.32.3 of the extension). I'm on macOS 14.7.1 if that's relevant.
Thank you both for the additional context. Good to hear that using the previous version is a workaround for now.
So far I haven't been able to reproduce the performance regression, but I'll keep investigating.
EDIT: Not that I think it matters, but the
v0.35.0
version is coming from the Arch Linux User Repository package, and I installedv0.34.3
from Hashicorp directly. Can testv0.35.0
directly from Hashicorp if that's useful
As a side note, the main difference between the community-built packages (like AUR or homebrew) and those from HashiCorp is that we bundle all official and partner provider schemas in the binary. This allows for a better out-of-the-box experience, as you'll get completion, hover, etc. for most providers without having to run terraform init
(or even have terraform installed). But, like you said, I don't think it makes a difference here.
Can also confirm that there seems to be some performance regression on v0.35.0, as opening a repo with 1000+ files (60k+ lines) seems peg the CPU indefinitely (total CPU time was at 4 hours when I stopped).
Reverting to v0.34.3
via reverting to VS Code extension v2.32.3
will result in pegged CPU for a couple of minutes and then it works as normal (total CPU time is under 1 hour). This is what I've had previously as the "expected" behavior.
MacOS 15.1 with an M3 Max.
Language Server Version
v0.35.0
Terraform Version
v1.9.8
Client Version
helix 24.7 (101a74bf)
Behavior
I'm seeing the same "red squiggle that I can watch recede over ~1 minute" issue I've seen in older versions, while
terraform-ls
is using 200%+ CPU.This is on a Terraform workspace with a few hundred resources, so not small, but not massive either. Unfortunately this isn't an open-source repo, but happy to collect metrics or whatever else may be useful.
Steps to Reproduce
terraform/
directory in my (not open-source, sorry) projectAfter a few saves/modifications, you'll start seeing things like:
I've typed a full, valid variable name, but the error will go through various stages of telling me various prefixes of that variable (
var.kagi
,var.kagi_prox
, etc) don't exist, over the course of 10s to 1m.Meanwhile, I can't save files because Helix is waiting for the LSP formatter to run, which is presumably blocked on these other LSP operations.
Terraform Configuration
Project Structure
Gist
I can grab if this is useful
References
No response
Community Note