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
As noticed by @eddie3ruff in #2597, there's a memory leak when re-creating many Plotly elements. The memory consumption of the browser tab (tested with Chrome) will grow until it crashes eventually:
I could not reproduce the issue on my Apple Silikon M3 Max. I added a title to the page to better find it in the chrome task manager <head><title>Plotly Memory Test</title></head>. Even reducing the delay of the interval to 10 ms did not raise the memory. I wanted to try if a Plotly.purge('container'); would make any difference. But it seems for me everything works as it should even without such manual management.
@rodja On my Apple M1 Max it takes about 1-2 minutes to see a significant growth. Did you wait that long?
Maybe it depends on how quickly the CPU can run the garbage collection. I did a longer test with an interval of 1 second, which uses more or less constant memory.
in Brave Browser on Windows 10 the plotly test HTML page above starts out using about 91 MB, but then drops to 86 MB after a minute, then after 2 minutes was using about 81 MB, so no leak here.
Description
As noticed by @eddie3ruff in #2597, there's a memory leak when re-creating many Plotly elements. The memory consumption of the browser tab (tested with Chrome) will grow until it crashes eventually:
We already found a reproduction without NiceGUI:
Is this a bug in plotly.js? How can we update or re-create plots without causing this issue?
The text was updated successfully, but these errors were encountered: