0 Replies - 809 Views - Last Post: 18 May 2021 - 12:00 AM Rate Topic: -----

#1 MichTar   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 17-May 21

[JavaFX] Slowing down application while drawing charts for a long time

Posted 18 May 2021 - 12:00 AM

I have written the JavaFX 1.8 application (I have to use this Java version) which draws several charts in different tabs in the real time. Data for each charts are receiving periodically and there are about 2 samples per second for all the charts. One chart stores 2000 samples and 4 other charts about 500 samples. Older samples are removing from the charts.

When the application is working for about 2 hours then the CPU load increases to the 100% and the application slows down a lot and there it is not possible to interact with GUI. When I reduce the number of samples to 100 per chart then there is no problem with slowing down the application.

In the code I set
setAnimated
and
setCreateSymbols
to
false
. For adding new samples to the charts I'm using the
getData().add(new XYChart.Data("TIMESTAMP", value))


I also checked that there is always using
Platform.runLater
command. When I make the simulation in which the same data are received in the shorter time then the the slowdown of the application appears faster.

Could someone help me how to resolve problem with slowing down the application?

Best regards,
Michael

Is This A Good Question/Topic? 0
  • +

Page 1 of 1