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

Open
Tracked by #1614
dbanck opened this issue Feb 12, 2024 · 1 comment
Open
Tracked by #1614

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

dbanck opened this issue Feb 12, 2024 · 1 comment
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 dbanck added this to the v0.34.0 (tentative) milestone Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant