-
Notifications
You must be signed in to change notification settings - Fork 131
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
Slow performance on v0.35.0 #1857
Comments
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 I just installed I'll use EDIT: Not that I think it matters, but the |
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.
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 |
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 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
Mostly just a standard GCP Terraform config, containing a few of the official Google modules, and a few local modules.
Project Structure
Replacing file names, but otherwise structure is preserved: . ├── address.tf ├── dir1 │ ├── 1.tf │ ├── 2.tf │ ├── 3.tf │ ├── 4.tf │ ├── 5.tf │ ├── 6.tf │ ├── 7.tf │ ├── 8.tf │ ├── 9.tf │ ├── 10.tf │ ├── 11.tf │ ├── 12.tf │ ├── 13.tf │ ├── 14.tf │ ├── 15.tf │ ├── 16.tf.json │ ├── 17.tf │ └── 18.tf ├── 1.tf ├── 2.tf ├── 3.tf ├── 4.tf ├── 5.tf ├── 6.tf ├── 7.tf ├── 8.tf ├── 9.tf ├── 10.tf ├── 11.tf ├── 12.tf ├── 13.tf ├── 14.tf ├── 15.tf ├── 16.tf ├── 17.tf ├── 18.tf ├── 19.tf ├── 20.tf ├── 21.tf ├── 22.tf ├── 23.tf ├── 24.tf ├── 25.tf ├── 26.tf ├── 27.tf ├── 28.tf ├── 29.tf ├── 30.tf ├── 31.tf ├── 32.tf ├── 33.tf ├── 34.tf ├── 35.tf ├── 36.tf ├── 37.tf ├── 38.tf ├── modules │ ├── dir2 │ │ ├── main.tf │ │ ├── output.tf │ │ └── variables.tf │ ├── dir3 │ │ ├── main.tf │ │ ├── output.tf │ │ ├── readme.md │ │ └── variables.tf │ ├── docs │ │ └── src │ │ ├── dir4 │ │ │ ├── 1 │ │ │ ├── 2.wiki │ │ │ ├── 3.sh │ │ │ └── 4.sh │ │ └── dir5 │ │ ├── 1.yaml │ │ ├── 2 │ │ ├── 3.old │ │ ├── 4.py │ │ ├── 5.sh │ │ ├── 6.py │ │ ├── 7.py │ │ ├── 8.md │ │ ├── 9.txt │ │ ├── 10.txt │ │ ├── 11.sh │ │ └── 12.sh │ └── dir6 │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── 39.tf ├── 40.tf ├── 41.tf ├── 42.tf ├── 43.sh ├── 44.tf ├── 45.tfvars ├── 46.tf ├── 47.tf ├── 48.tf ├── 49.tf ├── 50.tfvars ├── 51.tf ├── 52.tf ├── 53.tf ├── 54.tf ├── 55.tf.json ├── 56.sh ├── 57.out ├── 58.tf ├── 59.tf └── 60.tf 10 directories, 105 files
Gist
I can grab if this is useful
References
No response
Community Note
The text was updated successfully, but these errors were encountered: