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

harper-ls --stdio using too many threads #198

Closed
acampove opened this issue Oct 3, 2024 · 9 comments
Closed

harper-ls --stdio using too many threads #198

acampove opened this issue Oct 3, 2024 · 9 comments
Assignees
Labels
bug Something isn't working harper-ls

Comments

@acampove
Copy link

acampove commented Oct 3, 2024

Hi,

I just downloaded this with Mason and I am using it with neovim. I suddenly found out that I cannot spawn threads and when I check with htop I see that harper-ls is using about 150 theads:

image

Why is this happening? How can I configure this tool to use only one thread?

Cheers.

@grantlemons
Copy link
Collaborator

This should be configured by tokio to be the number of cores on your machine, how many do you have?

@elijah-potter elijah-potter added harper-ls bug Something isn't working and removed harper-ls labels Oct 3, 2024
@acampove
Copy link
Author

acampove commented Oct 4, 2024

This should be configured by tokio to be the number of cores on your machine, how many do you have?

I probably have around 128 cores. Do you know how to configure this using? I definitely do not think the program should be allowed to use all the cores. It should be limited to 2, at most 3. I am seeing the same problem with pyright, BTW.

@elijah-potter
Copy link
Collaborator

Ah. This should be a simple fix. We'll set harper-ls to cap out at 4 threads. That should be more than enough.

@elijah-potter
Copy link
Collaborator

@grantlemons drafted a fix and it has been merged. I'm going to spend some time with Harper this afternoon to make sure everything checks out before creating a release. At that point, you can confirm that the problem is fixed.

@acampove
Copy link
Author

acampove commented Oct 5, 2024

@grantlemons Thanks, could you please make another tag, 0.12.0? I am using Mason and this seems to download the latest tag.

@elijah-potter
Copy link
Collaborator

Sorry it took so long to get back to you on this. The Mason maintainer is extremely unresponsive when it comes to PRs. You should be able to get a new version now. Would you mind confirming whether your issue has been fixed?

@elijah-potter
Copy link
Collaborator

I'm assuming we're good here. Thanks for letting us know about the problem!

@acampove
Copy link
Author

Hi @elijah-potter thanks. I am having other issues with neovim, this time memory issues, but I think I haven't really seen any problem with this plugin lately, so I assume the update fixed the issue.

@elijah-potter
Copy link
Collaborator

I'm sorry about the other issues, but I'm glad Harper's working. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working harper-ls
Projects
None yet
Development

No branches or pull requests

3 participants