Memory leak
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
Hello,
first of all, thank you very much for this amazing project! ;). I think I have detected a possible memory leak. In my use case, I use a function that generates a big xarray DataArray, and another function that receives as input such big xarray DataArray an generates an image from it using hvplot.image(rasterize=True). I use jupyterlab to interact with such functions and visualize the generated image. I have noticed that every time I re-execute the code cell containing both functions, the memory usage keeps growing and growing. Please see the memory usage showed in the attached images (top right corner):
First execution of the code cell:

Second execution of the code cell:

Third execution of the code cell:

I tried the suggestion given by @philippjfr in holoviz/holoviews#1821 (%reset out) but it did not work.
Expected behavior: I expected the memory usage to keep constant between re-execution of the same code cell (the memory occupied but the data generated in the previous execution is supposed to be garbage collected), am I right?, or am I missing something?.
Software info:
hvplot: 0.6.0
holoviews: 1.13.3
datashader: 0.11.0
bokeh: 2.1.1
jupyter core : 4.6.3
jupyter-notebook : 6.0.3
qtconsole : 4.7.5
ipython : 7.16.1
ipykernel : 5.3.0
jupyter client : 6.1.3
jupyter lab : 2.1.5
nbconvert : 5.6.1
ipywidgets : 7.5.1
nbformat : 5.0.7
traitlets : 4.3.3
JupyterLab v2.1.5
Known labextensions:
@bokeh/jupyter_bokeh v2.0.2 enabled OK
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
@pyviz/jupyterlab_pyviz v1.0.4 enabled OK
Google Chrome
Version 84.0.4147.125 (Official Build) (64-bit)
OS
Ubuntu 18.04.4 LTS
Thank you very much for all your help! ;)
Contributor guide
Assessment
This issue has not been assessed yet.