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

Expose RPC request concurrency as a flag #504

Closed
radeksimko opened this issue May 11, 2021 · 1 comment · Fixed by #489
Closed

Expose RPC request concurrency as a flag #504

radeksimko opened this issue May 11, 2021 · 1 comment · Fixed by #489
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

radeksimko commented May 11, 2021

Current Version

0.16.1

Use-cases

Generally the language server should work well within the resource constraints of the machine that it is running on. i.e. it shouldn't use excessive amount of CPU.

The most common way of achieving this in Go is to cap number of concurrent operations to the number of available CPUs, i.e. runtime.NumCPU().

This should provide balance (between speed and CPU usage) for most users, but in some cases the user may wish to trade speed for CPU or vice versa - for example when they're actually more constrained and multiple other processes are competing for the same CPUs.

Proposal

Introduce -req-concurrency flag to terraform-ls serve which will control the concurrency of the underlying jrpc2 library. That way users have an escape hatch they can utilize in described (hopefully rare) cases.

@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 12, 2021
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