-
Notifications
You must be signed in to change notification settings - Fork 70
Constant browser memory growth in Vaadin Charts (specifically, type LINE) #6383
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
Comments
I my testing, using |
This looks like an issue on Highcharts side, as I was able to reproduce what I believe is the same issue in their latest version. I reported it here, let's see if they confirm it. |
As per this comment from one of their maintainers, it has been confirmed that this issue originates on Highcharts. As usual in this case, we will wait for their fix, and see if it's possible to patch it into our component since Highcharts usually don't backport bug fixes to older versions. |
I would assume the fix: vaadin/web-components#7785 will give a new workaround to this issue. Instead of just updating Chart data, throw Chart instance away and replace it by new one? |
The changes in vaadin/web-components#7785 could be used as a workaround for this issue, with the downside that removing and attaching a new chart instance would lose the animation after each new data point is added. The graph shows that the number of listeners stays fairly consistent after running it for over 5 minutes. |
Description
Updating an existing chart data series via DataSeries::add( item, true, true ), with Push enabled, causes a growing memory consumption - Chrome DevTools profiler suggests listeners are being added and not being cleaned up when the data points are shifted.
Expected outcome
Would expect memory to remain roughly constant as new data points are added
Minimal reproducible example
v23-chart-leak.zip
Steps to reproduce
Run the provided demo - in creates a chart with some settings ( similar to our production usage where we spotted the issue, in case the particular settings matter ), and sets a timer to update the chart once per second with new data. Shortening the interval will make the growth quite obvious:

Environment
Vaadin version(s): 23.5
OS: Linux
Browsers
Chrome
The text was updated successfully, but these errors were encountered: