-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Comments
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. |
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. |
@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 "languages": {
"Python": {
"language_servers": ["!pylsp", "pyright"],
} |
Yeah I am having the same issue. Running the same hardware as op. I can try to help debug this. Let me know if there is anything special you want me to capture (logs, profiling etc) |
Another +1 here. Ubuntu 22.04.5, Intel i7, 16GB. Crawling slow with |
I just hit this issue, too. pylsp mypy is following the typing sequence with a few seconds delays per each. |
It seems that at least some of the lag comes from the new LSP aggressively scanning the entirety of your venv for "errors". Copying my own screenshot from this discussion: Currently still observing these issues:
|
Check for existing issues
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
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: