-
Notifications
You must be signed in to change notification settings - Fork 764
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 takes 2+ minutes to analyze every change. #6140
Comments
Can you provide us with access to your code so we can attempt to reproduce this behavior? |
I am sorry, I cannot. This is a very large private code base. It does not happen in isolation, only when everything interacts. |
In that case, can you please collect a CPU profile of the issue? The profile may contain enough information for us to track down the underlying issue. There are instructions on how to do this here: https://github.com/microsoft/pylance-release/wiki/Collecting-data-for-an-investigation.#collecting-cpuprofiles |
Sure.
Note that I waited long minutes at idle parts (I made the change, left the computer for a while, not sure how long, then stopped profilling). Profiling:Logs (no tracing)Thanks! |
@asparagusbeef, thanks for the CPU profiles. Unfortunately I'm unable to load the ones that are most interesting, and my best guess is that I'm hitting a VS Code bug there. I filed microsoft/vscode#223565. I'm blocked on analyzing your files until I hear back from the VS Code team on this. |
@asparagusbeef, since the size of these files seems to be causing problems for profile viewers, could you try generating a new set of profiles and minimizing the duration of the recording? |
@asparagusbeef I have another idea to figure out the perf cause. since the log shows some files takes long time to analyze, how about you provide us this log (https://github.com/microsoft/pylance-release/wiki/Collecting-data-for-an-investigation.#collecting-type-evaluation-related-data-in-the-log) if you can do this and provide log for us, that will provide us best chance to find out what is causing perf issue. ...
... my gut feeling is some of your code require a lot of time for us to infer types. so if you provide type hints at some strategic points, that might improve overall perf. |
This issue has been closed automatically because it needs more information and has not had recent activity. If the issue still persists, please reopen with the information requested. Thanks. |
Environment data
Code Snippet
Cannot provide a code snippet as this happens in a large project with multiple workspaces.
Repro Steps
My project consists of 11 services that use 6 private packages (installed with
pip install --editable
)This happens in two scenarios:
company-commons
package.Note that scenario 2 doesn't happen when a package is installed with regular
pip install
.Expected behavior
I understand this is a large project, but I'm pretty sure my computer should be able to handle it at least an acceptable latency.
Actual behavior
It's excruciatingly slow. Sometimes over 2+ minutes for a small change.
Logs
My process for those logs was:
dispatcher.py
in thecompany-commons
workspace, and wait for the logs to stop and analysis to complete.https://pastebin.com/gRp7x9bd
The text was updated successfully, but these errors were encountered: