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

Walk hierarchy asynchronously #188

Closed
radeksimko opened this issue Jun 25, 2020 · 1 comment · Fixed by #196
Closed

Walk hierarchy asynchronously #188

radeksimko opened this issue Jun 25, 2020 · 1 comment · Fixed by #196
Labels
enhancement New feature or request
Milestone

Comments

@radeksimko
Copy link
Member

Current Version

v0.4.0

Use-cases

Currently the whole hierarchy is walked through to discover root modules on initialization synchronously:

walker := rootmodule.NewWalker()
walker.SetLogger(lh.logger)
err = walker.WalkInitializedRootModules(fh.Dir(), func(dir string) error {
lh.logger.Printf("Adding root module (via %T): %s", rmm, dir)
return rmm.AddRootModule(dir)
})
if err != nil {
return serverCaps, err
}

This can result in:

  1. delay in adding paths to the watcher
  2. delayed initial response to the client, which means the client may refuse to provide any functionality until initialize request is responded to

Proposal

Run walker asynchronously.

It should still be cancellable per session though.

@radeksimko radeksimko added the enhancement New feature or request label Jun 25, 2020
@radeksimko radeksimko added this to the v0.5.0 milestone Jun 26, 2020
@ghost
Copy link

ghost commented Aug 2, 2020

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 context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant