JDK-8193445 Performance Test

Scott Palmer swpalmer at gmail.com
Wed Nov 7 17:04:33 UTC 2018

> On Nov 7, 2018, at 8:37 AM, David Grieve <david.grieve at oracle.com> wrote:
> ...
> Reapplying CSS to a Node but not its children could cause a problem if there are styles in the parent or the parent's parents that affect the children. It seems like bypassing children in reapplyCSS is bound to cause a regression.

I agree that it is necessary to re-apply CSS to child nodes when the parent node CSS changes.  The issue that I originally reported was that I could see that child nodes had CSS re-applied more than once. The number of times CSS is applied is currently proportional to how deep in the scene graph hierarchy the node is.

When a subtree is added to the scene graph, I would expect that CSS can be reapplied to each node only once, so long as it is done in a top-down manner.

I could be wrong, I’m not certain how rules relating to sibling nodes might invalidate that assumption. In HTML there is the concept of adjacent sibling combinator, e.g. “img + p" for paragraphs that come immediately after any image.  I don’t think JavaFX has anything like that thoughts o top-down should work out.


More information about the openjfx-dev mailing list