-
Notifications
You must be signed in to change notification settings - Fork 133
Analysing in background causes memory leak #831
Comments
I get a similar thing on Linux. For me it maxes out one core for several minutes, and grows to analysing ~4,800 items "in background". I don't get the same memory leak though (it makes out at ~5Gb), and after 5-10 minutes it somehow completes, the number of items to analyse drops rapidly and eventually things return to normal. This happens whenever I open a Python file, regardless of workspace or folder. |
Opening a file still brings up import chain so dependencies are looked into. Yes, the memory is eventually released. @martinjohndyer, @commodityAI - could you give some information on what libraries you are using and if project is open source, could you please point to the GH for cloning. Thanks. |
Thanks @MikhailArkhipov. Yes it is definitely due to dependencies. A simple file that contains Is there any further logging that would be useful? I assume it's cumulative, i.e. because Astropy imports Numpy a lot that adds to the time. Is there not any way to cache whatever it's doing so it doesn't have to be rerun every time a new VSCode window is opened? |
@MikhailArkhipov sorry can't offer code examples, but for further info I left the same code running on an iMac last night.. went on for 3+ hours with the list of items only growing (got upto 10k+), mem usage reached a whopping 100GB and CPU many times over 100%... I'm only using vanilla python libs (pandas, numpy, flask, jupyter and the likes), nothing exotic... this does not seem a case of working through all the dependencies, but rather an uncontrolled memory leak |
For anyone experiencing this problem, a temporary workaround mentioned here microsoft/vscode-python#4986 (comment) is to use the jedi Language server instead. |
I'm going to close this in favor of the more active #832. |
Using Jedi will be OK |
After the most recent upgrade to the Python extention for VSCode, it grinds my laptop to a halt by consuming all the memory.
Extention information
Name: Python
Id: ms-python.python
Version: 2019.3.6139
Publisher: Microsoft
VSCode version
Version: 1.32.3 (user setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.14393
Some images
Note the Memory usage in Task Manager. This just continues growing rather quickly until it consumes all the available RAM on my laptop (25Gb) within 10 minutes or so.
I don't know which 7000 files it is analyzing, the currently open folder itself is tiny.
The text was updated successfully, but these errors were encountered: