Skip to content
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 Apex Chart when frequently using Vaadin push #136

Open
frankrues opened this issue Aug 12, 2022 · 0 comments
Open

Memory Leak in Apex Chart when frequently using Vaadin push #136

frankrues opened this issue Aug 12, 2022 · 0 comments
Labels
bug Something isn't working will accept PR

Comments

@frankrues
Copy link

Description
We have a dashboard in our Web Application showing different kind of data using ApexChart. The user can use an "Auto Refresh" function, where the server uses Vaadin's UI push mechanism to update the web view (based on a user defined interval).
When I look at Chrome Dev Tools -> Memory Total JS Heap Size, I can see that it is increasing from 15.3 MB to 28.1 MB in 2 minutes (push interval every 2 seconds). The memory is constantly increasing until Chrome reports an out of memory on the page.
I'm using Bar and Pie charts. The memory consumption is not related to any data. Even when the data isn't changing in-between the push intervals, more and more memory is consumed.

Note: if I don't use any ApexChart in the dashboard, the memory is not increasing

I also checked, it does not make any difference if

  1. each time to create a new chart, or
  2. each time update the series from an existing chart

Steps or code example to Reproduce

  1. Create a newScheduledThreadPool(1) and scheduleAtFixedRate with 2 seconds
  2. in the thread's runnable method, create a new chart or update the chart's series and use UI's push method
  3. Observe the memory consumption

image

**Desktop **

  • Windows 10
  • Chrome 104.0.5112.81 (Official Build) (64-bit)
  • 2.0.0-beta13
  • Vaadin 14.7.5
  • Vaadin Production Mode
  • Spring Boot v2.5.5
@frankrues frankrues added the bug Something isn't working label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working will accept PR
Projects
None yet
Development

No branches or pull requests

2 participants