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

GridPane may take an abnormally long time to be rendered

    Details

      Description

      Used FX 2.2.40 b28 on Win and Mac. The issue doesn't occur with FX 8 b93.

      The attached FXML layout contains a GridPane where what seems to be the trigger of the issue is the fact some of the row/columns constraints define a percent width/height as other don't.
      On a decent Intel i5 laptop it takes me several minutes to get the rendering window coming up.
      The Button in the layout has no added value except being sure something is visible (the grid doesn't contain any asset).

      I ran jstack several times while waiting the rendering and we spend the time in javafx.scene.layout.GridPane.growOrShrinkRowHeights (stacks below have been captured while using FX 2.2.40):

      "JavaFX Application Thread" prio=6 tid=0x18702c00 nid=0x9f4 runnable [0x1a4ee000]
         java.lang.Thread.State: RUNNABLE
              at javafx.scene.layout.GridPane.growOrShrinkRowHeights(GridPane.java:1617)
              at javafx.scene.layout.GridPane.adjustRowHeights(GridPane.java:1574)
              at javafx.scene.layout.GridPane.layoutChildren(GridPane.java:1480)
              at javafx.scene.Parent.layout(Parent.java:1018)
              at javafx.scene.Parent.layout(Parent.java:1028)
              at javafx.scene.Scene.layoutDirtyRoots(Scene.java:516)
              at javafx.scene.Scene.doLayoutPass(Scene.java:487)
              at javafx.scene.Scene.preferredSize(Scene.java:1489)
              at javafx.scene.Scene.impl_preferredSize(Scene.java:1516)
              at javafx.stage.Window$9.invalidated(Window.java:716)
              at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
              at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
              at javafx.stage.Window.setShowing(Window.java:779)
              at javafx.stage.Window.show(Window.java:794)
              at javafx.stage.Stage.show(Stage.java:229)
              at javafxapplicationdtl5742.JavaFXApplicationDTL5742.start(JavaFXApplicationDTL5742.java:26)
              at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
              at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:30)
              at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:74)
              at java.lang.Thread.run(Thread.java:722)

      "JavaFX Application Thread" prio=6 tid=0x18702c00 nid=0x9f4 runnable [0x1a4ee000]
         java.lang.Thread.State: RUNNABLE
              at javafx.scene.layout.GridPane.growOrShrinkRowHeights(GridPane.java:1600)
              at javafx.scene.layout.GridPane.adjustRowHeights(GridPane.java:1574)
              at javafx.scene.layout.GridPane.layoutChildren(GridPane.java:1480)
              at javafx.scene.Parent.layout(Parent.java:1018)
              at javafx.scene.Parent.layout(Parent.java:1028)
              at javafx.scene.Scene.layoutDirtyRoots(Scene.java:516)
              at javafx.scene.Scene.doLayoutPass(Scene.java:487)
              at javafx.scene.Scene.preferredSize(Scene.java:1489)
              at javafx.scene.Scene.impl_preferredSize(Scene.java:1516)
              at javafx.stage.Window$9.invalidated(Window.java:716)
              at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
              at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
              at javafx.stage.Window.setShowing(Window.java:779)
              at javafx.stage.Window.show(Window.java:794)
              at javafx.stage.Stage.show(Stage.java:229)
              at javafxapplicationdtl5742.JavaFXApplicationDTL5742.start(JavaFXApplicationDTL5742.java:26)
              at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
              at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:30)
              at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:74)
              at java.lang.Thread.run(Thread.java:722)

      "JavaFX Application Thread" prio=6 tid=0x18702c00 nid=0x9f4 runnable [0x1a4ee000]
         java.lang.Thread.State: RUNNABLE
              at javafx.scene.layout.GridPane.growOrShrinkRowHeights(GridPane.java:1614)
              at javafx.scene.layout.GridPane.adjustRowHeights(GridPane.java:1574)
              at javafx.scene.layout.GridPane.layoutChildren(GridPane.java:1480)
              at javafx.scene.Parent.layout(Parent.java:1018)
              at javafx.scene.Parent.layout(Parent.java:1028)
              at javafx.scene.Scene.layoutDirtyRoots(Scene.java:516)
              at javafx.scene.Scene.doLayoutPass(Scene.java:487)
              at javafx.scene.Scene.preferredSize(Scene.java:1489)
              at javafx.scene.Scene.impl_preferredSize(Scene.java:1516)
              at javafx.stage.Window$9.invalidated(Window.java:716)
              at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
              at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
              at javafx.stage.Window.setShowing(Window.java:779)
              at javafx.stage.Window.show(Window.java:794)
              at javafx.stage.Stage.show(Stage.java:229)
              at javafxapplicationdtl5742.JavaFXApplicationDTL5742.start(JavaFXApplicationDTL5742.java:26)
              at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
              at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:30)
              at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:74)
              at java.lang.Thread.run(Thread.java:722)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msladecek Martin Sládeček
                Reporter:
                yjoan Yves Joan (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: