vscode-terraform icon indicating copy to clipboard operation
vscode-terraform copied to clipboard

Saving documents is extremely slow on windows

Open ilmax opened this issue 1 year ago • 4 comments

Extension Version

v2.29.3

VS Code Version

Version: 1.85.2 (user setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22621

Operating System

Edition Windows 11 Pro Version 22H2 OS build 22621.3007

Terraform Version

Terraform v1.7.0 on windows_amd64

Behavior

When editing a file and pressing Ctrl+S to save file changes, the following dialog appears image preventing the file to be saved until such dialog disappears.

Steps to Reproduce

Any modification (e.g. add an empty line to a tf file) followed by a save

Terraform Configuration

No response

Project Structure

No response

Gist

No response

Anything Else?

Just for the record, running find . *.tf | wc -l returns 2358.

References

No response

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

ilmax avatar Jan 26 '24 08:01 ilmax

Not only on Windows, MacOS as well. It's taking 20 seconds to save a file. 🤦

shinebayar-g avatar Jan 26 '24 17:01 shinebayar-g

Same here. The extension often seemed to get bogged down, especially if there were a lot of nested modules pulled in after a terraform init.

But it is getting worse. Sometimes it can take 60secs to format and save a file.

scott-doyland-burrows avatar Feb 14 '24 23:02 scott-doyland-burrows

We've just released v2.31.2024061114, which ships with a re-architected language server for improved performance and resource usage (terraform-ls#1667). The language server will now start up much faster and use fewer resources, especially on larger workspaces.

In VS Code, you can opt in to the extension preview: CleanShot 2024-06-17 at 12 18 50@2x

If you have the time, please give it a try and let us know how it works for you. We have tested this with workspaces of different sizes, but still expect some bugs due to the wide variety of configurations. Your feedback is greatly appreciated.

dbanck avatar Jun 17 '24 10:06 dbanck

Just installed here and indeed it seems to be performing way better, I still get the "Saving...." dialog every now and then, but this is definitely an improvement!

ilmax avatar Jun 17 '24 10:06 ilmax

We've shipped the re-architected language server in the 2.32.0 stable release last week. The language server will (still) start up much faster and use fewer resources, especially on larger workspaces.

I would like to close this issue for now. Please let us know if you experience any problems or regressions.

dbanck avatar Jul 22 '24 14:07 dbanck

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. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Aug 22 '24 03:08 github-actions[bot]