Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Slowing down the JavaFX application while drawing charts for a long time

User_899LLMay 17 2021

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

Comments
Post Details
Added on May 17 2021
0 comments
245 views