Skip to content
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 completion #1299

Closed
ohemelaar opened this issue Dec 13, 2022 · 7 comments
Closed

Slow completion #1299

ohemelaar opened this issue Dec 13, 2022 · 7 comments
Assignees
Labels
bug Something isn't working performance Gotta go fast terraform-ls Features/bugs which will be implemented/fixed purely on the LS side waiting-response

Comments

@ohemelaar
Copy link

ohemelaar commented Dec 13, 2022

Versions

Extension

v2.25.1

VS Codium

Version: 1.74.0
Release: 22342
Commit: cb188d662af4ff5d43505b572b49905a1f0153ad
Date: 2022-12-08T20:05:53.183Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 6.0.0-1007-oem
Sandboxed: No

With VSCode too

Version: 1.74.0
Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91
Date: 2022-12-05T16:47:18.476Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 6.0.0-1007-oem
Sandboxed: No

Operating System

Ubuntu 22.04.1 LTS 

Terraform Version

Terraform v1.3.6
on linux_amd64

Steps To Reproduce

Clone this project we use as template : https://gitlab.com/vigigloo/templates/terraform-project
Open the editor in environment/namespaces.tf for example and start typing to add

locals {
   test = var.
}

Expected Behavior

The completion should quickly show the variables available in the module.

Actual Behavior

It's slow.

0001-0207.mp4

Additional context

Doesn't only happen in locals blocks. But doesn't happen in some modules, for example if you edit a file at the root of the repository I provided it's pretty snappy.

I guess this is not quite enough data to possibly find the issue, although I hope someone can reproduce this slowness using the same repository. If you have any tips to give me of debug traces and stuff I could provide to have a better insight please let me know 🙏

@ohemelaar ohemelaar added the bug Something isn't working label Dec 13, 2022
@dbanck
Copy link
Member

dbanck commented Dec 16, 2022

Hi @ohemelaar!

Thanks for raising this with a demo project to reproduce and a video of the actual behavior.

Do you mind sharing the extension log as well? It contains request times and background job information, which might help figure things out.

You can also send the log to daniel.banck <at> hashicorp.com & use my PGP key at https://keybase.io/dbanck to encrypt it if you're worried about posting it publicly here.

@ohemelaar
Copy link
Author

I just sent you the logs, although I see the times are only precise to the second. Hope it still helps

@xiehan xiehan added terraform-ls Features/bugs which will be implemented/fixed purely on the LS side performance Gotta go fast labels Apr 21, 2023
@dbanck
Copy link
Member

dbanck commented Apr 25, 2023

Thank you for sending the logs, and please excuse the late response. I can reproduce this on macOS and Linux with a slow network connection.

The job that pulls module information from the registry is also the culprit here. We plan to improve that job with some error caching and hope it will resolve this issue.

@dbanck
Copy link
Member

dbanck commented Apr 28, 2023

We released the new extension 2.26.0 version (and 0.31.1 language server version) with a potential fix. So please try it and let us know if it solves this issue.

@ohemelaar
Copy link
Author

It seems to be working better now, thanks!

@ohemelaar
Copy link
Author

(using vscodium 1.78.2, HashiCorp Terraform v2.26.1 and terraform-ls 0.31.2)

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working performance Gotta go fast terraform-ls Features/bugs which will be implemented/fixed purely on the LS side waiting-response
Projects
None yet
Development

No branches or pull requests

3 participants