How do I find out why the render loop is running?
mike at plan99.net
Fri Oct 3 20:37:05 UTC 2014
Well, this was a pain in the ass. The cause is indeed
ProgressBar/ProgressIndicator. It turns out that they can "leak" animations
even when removed from the scene graph or their parents are made invisible.
I now have a bunch of hacks to set the progress bar/indicators I have to
non-indeterminate when they're no longer visible or just before they are
removed from the scene graph, to let them clean up. I don't know why this
is required because I can see the code is trying to do the right thing, but
for whatever reason it does not seem to work reliably.
I figured out what's running by taking a look at
Toolkit.getToolkit().getMasterTimer().receivers every so often. A healthy
(idling) app that isn't using up battery should have just a single entry
inside a button click handler. If there are more, it means the app is
animating even if nothing on the screen is changing.
More information about the openjfx-dev