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

pylsp running very slowly #21076

Open
1 task done
alexrkaufman opened this issue Nov 22, 2024 · 4 comments
Open
1 task done

pylsp running very slowly #21076

alexrkaufman opened this issue Nov 22, 2024 · 4 comments
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@alexrkaufman
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Recently Zed switched to pylsp as the default linter. I am finding it runs much slower that pyright ran and I have had to change my settings to use pyright specifically instead of the default.

The gif below uses default zed settings for python linting as of 2024-11-22.

(It seems to lint better so I am happy with the switch otherwise.)

Environment

Zed: v0.162.5 (Zed)
OS: macOS 15.1.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screen Recording 2024-11-22 at 1 09 34 PM

If applicable, attach your Zed.log file to this issue.

Zed.log

@alexrkaufman alexrkaufman added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Nov 22, 2024
@osiewicz
Copy link
Contributor

What is the source of the diagnostic in this video (this should be the prefix of it's contents)? As in, is it mypy or something else? I'm pretty positive that some of the issues with pylsp performance would have to be either fixed via our config (e.g. we should probably use dmypy instead of mypy) or upstream.

@alexrkaufman
Copy link
Author

I am not sure, I tested it by disabling pylsp and telling zed to use pyright again. When I did this it was back to running quickly. Then I disabled pyright and any other linters so it would use the zed defaults which caused it to run slowly so I made the gif.

The file sizes I had open weren't that large. A couple of files, two or three open between 100-400 lines.

I can replicate it again and try to get additional information if that would be helpful.

@andaag
Copy link

andaag commented Nov 28, 2024

@alexrkaufman can you share the config changes to move this back to pyright?

I have a codebase I'm working in where pylsp goes to 100% cpu and just sits there. Both completion and linting is completely broken since this change.

@carlosds731
Copy link

@alexrkaufman can you share the config changes to move this back to pyright?

I have a codebase I'm working in where pylsp goes to 100% cpu and just sits there. Both completion and linting is completely broken since this change.

Just use "language_servers": ["!pylsp", "pyright"]

"languages": {
    "Python": {
      "language_servers": ["!pylsp", "pyright"],
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

4 participants