Skip to content

Performance issues when there is a large amount of references to local modules #2151

@Pidgegeddon

Description

@Pidgegeddon

Extension Version

v2.37.5

VS Code Version

Version: 1.105.1 (user setup)
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Operating System

Windows 11 Pro Version 25H2 OS build 26200.6725

Terraform Version

Terraform v1.13.4 on windows_amd64

Behavior

Opening files and editing files in a folder with many terraform files and many module references causes vscode to hang. This is more noticeable with weaker cpu's or with more references to modules in multiple files. It looks like the extension is reading all module references in all files multiple times even when it is not needed.

I can see there have been multiple discussions on this, but they all seem stale? I apologize if this is a duplicate.

Steps to Reproduce

  1. Have a couple of modules
  2. Have a root module with many files and references to those modules.

I have created a repo demonstrating this issue that may be of use. That repo also contains a log file with the extension output.

Terraform Configuration

Project Structure

Gist

No response

Anything Else?

The demo repo "only" have 400 module references in 200 files. The folder/repo where we are experiencing more slowness have 519 module references in 199 files.

References

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions