-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Memory leak in dynamically updated scatter plot. #1755
Comments
Interesting. This is the first time I hear about a (possible) memory leakage in an SVG-based trace type (#957 and plotly/plotly.py#487 identify problems with the WebGL-based I remember @alexcjohnson taking about noticing some memory issues in codepen itself that couldn't be replicated in a plain HTML page. @adamshapiro0 have you noticed this leaky behavior outside of codepen? |
@adamshapiro0 is using |
(Sorry for the delay - traveling.) @etpinard, I tried copying the codepen code directly into a local HTML file and I think I'm seeing slow memory growth. It's a bit hard to tell because of variation due to garbage collection, but I watched it for a while and it did at least seem to be growing on average. I can try to play some more to confirm when I have a bit more time. |
I am having the same issue with memory growing as I update my chart in plotly. I have tried a few different ways to update the chart using newPlot and deleteTraces / addTraces but I am seeing the memory usage rise in chromes task manager by 100k to 500k every time I try to update my chart with new traces. Anyone have any other suggestions on how to try rebuilding / updating the chart? |
Closing as I'm hoping this thing is obsolete. |
No, it's not. I am seeing memory leak. If I dont execute Plotly.react then it's not happening. |
Can you share a reproducible example to help us debug? Thank you! |
I was wrong about a straight memory leak, however my confusion is based on the following scenario. I have a button that sends a data request to the server and upon data arrival processes the data and renders a chart. Let's assume that data retrieval takes 5 secs and chart rendering (Plotly.react) takes 5 secs too. If I keep clicking the button before data is processed and Plotly.react is executed then I have no memory leak, but once I click the button that will start reprocessing of the unfinished chart it creates a memory leak. That's the impression I am getting. |
Hi,
I'm using scatter plots as part of a real-time data display where I'm updating the data set relatively frequently (large volume of data @ ~5-10Hz). I've noticed a significant growth in memory usage as the plot is updated on the order of 100s of MB over a short span of time. I made a small pen to demonstrate, just generating random data and restyling the plot:
https://codepen.io/adamshapiro0/pen/jwOWgZ
I've found a few things after a bunch of digging and googling:
I can't tell if this is an issue with Plotly or a deeper HTML5/v8 issue, but since it seems to affect both browsers I'm leaning towards Plotly.
This might be related to #957 and plotly/plotly.py#487, but it's not quite clear.
Any thoughts?
The text was updated successfully, but these errors were encountered: