Fwd: Re: Are hidden animations costless?
martin.sladecek at oracle.com
Mon Dec 3 02:10:59 PST 2012
Forwarding to the list, as I accidentally replied only to Randahl.
-------- Original Message --------
Subject: Re: Are hidden animations costless?
Date: Mon, 03 Dec 2012 11:00:27 +0100
From: Martin Sladecek <martin.sladecek at oracle.com>
To: Randahl Fink Isaksen <randahl at rockit.dk>
yes, partially, but not the timeline itself.
While the animation will be still ongoing (if you don't stop it
explicitly), there are many optimizations that save CPU time. First, the
affected nodes are not synchronized with the render graph, so the only
thing that changes is the animated property. Also, the invisible
sub-trees are skipped in the render graph when rendering, so you'd save
up same time by making some nodes/groups invisible even if there wasn't
any animation at all.
On 12/03/2012 10:15 AM, Randahl Fink Isaksen wrote:
> Say, I have two panes each one showing a bouncing beach ball, and one showing a bouncing tennis ball, and a button for switching between them (by setting visible to true and false). Then, when the bouncing beach ball pane is shown, and the bouncing tennis ball is hidden, does JavaFX then automatically save the resources otherwise spent on animating the tennis ball?
> In other words: Do timelines of things that are invisible consume CPU?
More information about the openjfx-dev