-
Notifications
You must be signed in to change notification settings - Fork 180
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
Extension causes high cpu load #501
Comments
Same happens to me and reason for this is that upon starting the VS Code extension executes multiple instances of terraform cli trying to obtain information about providers etc. Not sure how to disable this. |
Also seeing similar behavior, my environment is setup to open a monorepo with probably 100+ tf backends/workspaces. Wondering if it can more nicely start up/iterate through all those. Or if this setting might help? |
With the Terraform extension enabled in a workspace with 50+ Terraform root modules, I also experience the OS becoming unresponsive due to a high CPU load when opening the workspace. I assume that this is related to the method terraform-ls inspects the root modules. There is an open issue for terraform-ls to cap the auto-loading: hashicorp/terraform-ls#186. My hope is, that terraform-ls allows to configure a limit for the auto-loading in the future. I still do not understand why terraform-ls tries to auto-load the modules in a so massively parallel manner. |
For affected workspaces, I am using the following settings as a bad workaround to prevent starting terraform-ls and thus prevent massive slow down of the system while at least keep the syntax highlighting feature of the extension. {
"settings": {
"terraform.languageServer": {
"external": true,
// Configure a non-existing path for terraform-ls to prevent massive slow down of the system for workspaces with lots of Terraform modules
"pathToBinary": "/Users/lekse/bin/terraform-ls-fake",
"args": [
"serve"
],
"maxNumberOfProblems": 1,
"trace.server": "off"
}
}
} |
Hi folks, With that I'm going to close this issue, but feel free to open a new one if you continue having issues and include the version of the language server and the extension in such new report please. |
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. |
Performance
terraform
2.2.3
Windows_NT x64 10.0.19041
1.50.1
c:\Users\silwa\AppData\Local\Temp\hashicorp.terraform-unresponsive.cpuprofile.txt
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
The text was updated successfully, but these errors were encountered: