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

Reduce the amount of initial work when walking a workspace #1629

Closed
Tracked by #1614
dbanck opened this issue Feb 12, 2024 · 3 comments
Closed
Tracked by #1614

Reduce the amount of initial work when walking a workspace #1629

dbanck opened this issue Feb 12, 2024 · 3 comments
Assignees
Labels

Comments

@dbanck
Copy link
Member

dbanck commented Feb 12, 2024


When the language server starts, we walk the whole workspace, checking each folder we encounter.

Instead of scheduling all jobs as soon as we encounter a directory, we could check if the directory contains any files relevant to the language server (.tf, .tf.json, .tfvars, .tfvars.json, …) and take a note of if by scheduling a discovery job. In the new discovery job, we create the necessary state entities and can decide if it makes sense to schedule further jobs. Or create small state entries (just Path) during walking and do everything else on open.

@dbanck dbanck self-assigned this Feb 12, 2024
@dbanck
Copy link
Member Author

dbanck commented Mar 22, 2024

With this change, initialize for a large workspace now takes 0.1s instead of 17.63s on my machine.

@dbanck
Copy link
Member Author

dbanck commented Jun 11, 2024

Closed via #1667

@dbanck dbanck closed this as completed Jun 11, 2024
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 Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant