Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151756

JavaFX CSS is applied redundantly leading to significant performance degradation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 8u72
    • javafx
    • JDK 1.8.0_72 64-bit
      Windows 7

    • generic
    • generic

    Backports

      Description

        When a Node hierarchy is added to the Scene CSS is applied multiple times depending on the depth of the node in the added hierarchy. For every level of depth in the hierarchy the CSS is applied an extra time.

        See attached test case where a VBox containing another VBox containing a Rectangle is added to the Scene. Run the application in a debugger. When the UI appears set a breakpoint at Node.reapplyCss() then hit the button. Note that the breakpoint is hit three times for the Rectangle, twice for the 'parent2' VBox, and once for the 'parent1' VBox.

        This leads to significantly poorer performance and causes far more garbage to be generated than it should.

        Attachments

          Issue Links

            Activity

              People

                jgiles Jonathan Giles
                swpalmer Scott Palmer
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: