-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Spyder does not free up memory after closing windows with datasets in the Variable explorer #3513
Comments
Thanks for reporting. We'll take a look at it for Spyder 3.1. |
I tried it out, and it looks to me that the memory is released, eventually. It does however take a while before the freed memory shows up in the memory usage displayed in the Spyder. It looks like all data is copied when you open the dataframe editor based on the amount of time it takes to open the window. @ccordoba12 Should it? From reading the code, I get the impression that only a small amount of data is supposed to be copied, not the whole dataframe. I'm finding it really hard to understand the communication between the Spyder process and the IPython process, so an overview would be helpful. It is not necessary to use the specific data set mentioned by the original poster. Instead, you can use for instance:
This creates a data set occupying roughly 1GB. |
That's correct, data is serialized in the kernel and sent to Spyder so we can show it with our different editors.
Nop, what we do is to show data in chunks in the dataframe editor, but at any moment we have access to the full dataframe. I don't know how we could do it otherwise :-)
Ok, so these are the steps we follow to show a value in one of our editors:
I know this is very complex, but we have to do all this because the kernel runs in an external process (which can be local or remote, i.e. in a different server :-) |
Thanks very much for taking the time to write that all down; I'm sure that will be helpful.
I think it was the following comment which gave me the wrong idea. This is however only done in the remote case, which means 'on a different server' in this context. |
I hope this is something that gets resolved ASAP. This consistently slows down my entire machine and causes the IDE to crash regularly (every 10 minutes or so) when I'm working with large datasets. Is the only solution right now to restart my kernel every time I look at a couple dataframes? Version and main components
Dependencies
|
We need to garbage-collect values we grab from the kernel after users close our viewers. I'll try to do that for 3.0.2 :-) |
Description
What steps will reproduce the problem?
0.~Optionally, display memory usage (Preferences --> General --> Advanced Settings --> Check the box named 'Show memory usage')
using the following code
import pandas as pd
raw = pd.read_csv('transactions.csv')
2.~Once you have read it into your RAM, try to glimpse at it by double clicking in the Variable Explorer. You will see a window that displays your data set.
3. Close this window
4. Repeat Step 2 until your RAM is full.
What is the expected output? What do you see instead?
Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: