Dirty nodes are nodes in the scene that have been declared invalid. They are processed once for each frame, so if the JavaFX Application Thread (user interface thread) is busy, then synchronization of dirty nodes cannot occur.
We had a problem on the list screen, in which each cell of the list contained many rectangles and texts. The entire list contained several hundred nodes.
Cells in a listview should not be reused, but must be created each time the list is redrawn. When there were a lot of lines in the list, and the user held the scroll bar and moved it for a minute, synchronization of dirty nodes could not occur, and we selected an exception from memory, because there were hundreds of dirty nodes for business cards.
So my suggestion is to check if you block Application Application Thread when adding nodes to it.
It is good practice to create nodes in the background thread and add this scene to the user interface thread.
source share