-
Notifications
You must be signed in to change notification settings - Fork 771
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
Pylance very slow #57
Comments
Do you make use of type stubs for your imported third-party libraries, or are you relying on the type checker to extract type information from the library implementations? My team also has a large python code base, and Pyright (which is the type checker used in Pylance) is many times faster than mypy. So I'm curious what is different about your code base. By any chance, is your code base publicly available (e.g. in a public github repo)? If so, I can look into this more. If not, I don't think there's much I will be able to do to diagnose further. |
How do I check that I'm using type-stubs? Also, I should have mentioned I have two 3rd party libraries (dask and fastparquet) that we've forked and we are using our own forked version (hosted on github) in this project. The code isn't public, but I'll reach out on a different channel to share it privately with you if you'd like. |
I think I've found and fixed the issue that was causing the slow performance you were seeing. There were certain code constructs (namely, a large number of conditional statements nested within loops) that were confounding the code flow engine in Pylance. I've added some additional caching to handle this case. |
After move to pylance I see that VSC working hardly. Eg. when I saving changes and trying quick test for QT/Pyside2 apps then must wait for VSC do own job (like with pylance) and after some time push "play" to execute code in other case have this type info everytime. I'm new with pylance but before this in case of work with "hudge" MVC projects not meet this type to often, now with small simple apps give this time after time - only 3-4 try again, again, runing app in debug coretly. I'm minimal with other extensions etc.. |
This issue has been fixed in version 2020.7.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202070-9-july-2020 |
Environment data
requirements.txt
Expected behaviour
Pyright claims speed, I expected pylance to finish analysis and highlight issues in my code file within a few seconds. I expected it to at least beat the run time of pylint + mypy on that same code file.
Actual behaviour
mypy + pylint complete analysis + highlighting within < 3 seconds, pylance completes within > 10 seconds.
Logs
Python Output Console:
Code Snippet / Additional information
My code base is pretty large, this might be the issue. See screen recording below - recording starts as I hit Save after introducing a stupid syntax error. First highlights are from mypy+pylint while Pylance highlights come much after. Note the hogging of the code.exe process.
The text was updated successfully, but these errors were encountered: