-
Notifications
You must be signed in to change notification settings - Fork 767
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
memory and cpu leak when version 2020.9.0 installed #321
Comments
I'm not sure which issue template you used, but the bug template asks for logs and a bit more info, otherwise we don't have anything to go off of here. https://github.com/microsoft/pylance-release/blob/master/TROUBLESHOOTING.md#filing-an-issue |
I've experienced the same issue, but the main reason why this happened for me was Local History extension. It stores diff of file changes as separate files. During indexing on startup JS was out of memory, possibly because of the large number of files. My env:
Language Server log snippet:
|
The most recent update added an indexer, which would scan all of the files in your workspace to find symbols. It's likely your workspace is so big that we run out of memory; the indexer does consume a bit until it "finishes" and then drops the unnecessary data. Be aware that a leak would imply we would consume this memory for all time and never release, even over a very long period; that's not what's intended, but if the original poster meant a general increase in memory at startup (or this OOM scenario with many files), that makes sense. I'm not sure why the version install menu doesn't work; other users have been able to do it. |
That extension stores files in a specific folder, perhaps we need to be providing a way to explicitly ignore a set of files/folders, in addition to the overall "improve the performance" goal. |
@Uraniun, a possible workaround for now would be to store the history outside the workspace. The docs for the Local History indicates that you can do this. Would you please try this and let us know if this fixes the issue? |
@judej , yes, moving |
|
current working solution for me is downgrade pylance to 2020.8.3 |
I'm having the same memory consumption, with 12 GB consumed until my 16 GB memory is exhausted. If this is the symbol construction, it should be definitively optimized. Not sure how can I provide useful data (I don't think logs serve here) for debugging this. |
I'm also experiencing this as well. LMK what I can grab for logs to help out. Paralyzes both a core i5 and a core i9 16" MBP and makes VSCode practically unusable. |
Same here. As soon as I start VSCode, all four cores are fully utilized and the 8 GB memory is filled until the system freezes. |
The same for me. Reinstalling the previous version worked well. First I had to figure it out how to make it. Here is some help:
|
Confirming this issue in a Python repository with ~1M lines of code. Seeing the same behavior as above:
Needed to downgrade. |
I can confirm enormous CPU consumption with 2020.9.0 on a relatively big workspace. Full 8 cores for several minutes after the vs code start. This basically results in a complete local DOS. Waiting for it to finish indexing works but it looks like it would be more satisfying to start indexing on-demand on a folder by folder basis after a file is opened in the folder. |
And this happens on each start. At least, the data could be cached, I guess. |
Same here. Going to downgrade |
This issue has been fixed in version 2020.9.4, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202094-10-september-2020 |
ms-python version: 2020.8.106424
The text was updated successfully, but these errors were encountered: