You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent some time trying to debug a memory leak caused by calling plotly.express.line within a Dash live update callback under a Python 3.13.3t (free-threaded). Setting PYTHON_GIL=0 or PYTHON_GIL=1 appears to make no difference.
By no means have I located the root cause of the issue (not yet anyway), but I've been able to at least narrow it down to at least one problematic line of code in the BaseFigure class
If I run the example code shown below (which is HIGHLY distilled from the originating Dash app I was trying to debug), the memory footprint seems to steadily climb with each iteration. If I comment out the offending line within BaseFigure (shown above), the memory footprint remains stable
I spent some time trying to debug a memory leak caused by calling
plotly.express.line
within a Dash live update callback under a Python 3.13.3t (free-threaded). SettingPYTHON_GIL=0
orPYTHON_GIL=1
appears to make no difference.By no means have I located the root cause of the issue (not yet anyway), but I've been able to at least narrow it down to at least one problematic line of code in the
BaseFigure
classhttps://github.com/plotly/plotly.py/blob/main/plotly/basedatatypes.py#L581
If I run the example code shown below (which is HIGHLY distilled from the originating Dash app I was trying to debug), the memory footprint seems to steadily climb with each iteration. If I comment out the offending line within
BaseFigure
(shown above), the memory footprint remains stableFor long running applications like the one described earlier, slow and steady memory consumption issues are causing some rather significant issues.
System details
OS:
docker://python:3.12-slim-bookworm
Arch:
aarch64
Python version:
uv python install 3.13.3t
Plotly version:
6.0.1
The text was updated successfully, but these errors were encountered: