Closed tomvanbraeckel closed 5 years ago
Long duration (11 days) test seems to indicate that the memory increase caused by the xygraph stabilizes after some time and after that, the increase is minimal. I will do further testing to confirm but for now it looks like this is a minor issue, or maybe even a non-issue.
Unable to demonstrate long-term memory increase using xygraph so this can be closed.
We noticed that the memory usage of Yamcs Studio v1.0.5 is increasing by around 500MB/day and not being free'd when we have a big display called "ASIM MAIN.opi" opened.
Heap dumps pointed to draw2d.FigureCanvas as the potential root cause so we removed all 9 xygraph widgets from the display and indeed, the symptoms went away. Without the xygraph's, memory usage was stable, tested over a 24-hour run.
This issue should be easy to reproduce by making a display with some xygraph widgets, running it for some time with telemetry being graphed and monitoring the memory consumption of Yamcs Studio.
Note: one xygraph can be expected to leak 500MB/24 hours = only 2.31MB/hour so to reliably reproduce the issue, it might be necessary to use many xygraph widgets or to let the test run for a long time.
Perhaps a test display with 10 or even 100 xygraph widgets would be a nice stress test for Yamcs Studio, and it would demonstrate the issue by consuming more than 200MB of RAM per hour...