-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Bug tojson memleak #45489
Bug tojson memleak #45489
Conversation
@vernetya great find! I think this will end up making its way into 1.4.1 whenever the whatsnew for that gets created. Code-wise lgtm @jreback @jbrockmendel @simonjayhawkins |
doc/source/whatsnew/v1.5.0.rst
Outdated
@@ -227,7 +227,7 @@ MultiIndex | |||
I/O | |||
^^^ | |||
- Bug in :meth:`DataFrame.to_stata` where no error is raised if the :class:`DataFrame` contains ``-np.inf`` (:issue:`45350`) | |||
- | |||
- Bug in :meth:`to_json` fix memory leak (:issue:`43877`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vernetya can you move to 1.4 (if you can do tonight will merge) otherwise can put in 1.4.1
@simonjayhawkins not a blocker for release (we can put in 1.4.1 as well) |
thanks @vernetya |
@meeseeksdev backport 1.4.x |
Something went wrong ... Please have a look at my logs. |
Co-authored-by: vernetya <52132110+vernetya@users.noreply.github.com>
Thanks for the backport |
Fix memory leak when calling
to_json
appeared in 1.1.0. From these changes, inget_values
function, it looks likevalues
from here are not cleaned in this path.I run the following loop and plot the memory usage using memory_profiler:
Here on linux (python 3.8.10)
pandas/main:
with changes in this PR:
On Windows 10 (python 3.8.5):
pandas/main:
with changes in this PR:
I run under valgrind (10 loops), less revealing but there're diff:
pandas/main:
with changes in this PR: