-
Bug
-
Resolution: Unresolved
-
P4
-
8u5
-
Windows 7 64-bit, 32-bit JVM
We noticed that if one uses static setters in FXML, e.g. AnchorPane.bottomAnchor="0.0", there is a substantial performance impact on FXML parsing.
More than 90% of the execution time is spent in these two methods:
com.sun.javafx.fxml.BeanAdapter.getStaticSetterMethod(Class, String, Class, Class)
com.sun.javafx.fxml.BeanAdapter.getStaticGetterMethod(Class, String, Class)
a) Parsing an FXML with 100 stack panes in an AnchorPane with static setters takes ~100ms on average on my machine
b) Parsing an FXML with 100 stack panes in an AnchorPane without static setters takes ~8ms on average on my machine
c) Creating the same scene tree as in a) programmatically takes ~2ms on average on my machine
More than 90% of the execution time is spent in these two methods:
com.sun.javafx.fxml.BeanAdapter.getStaticSetterMethod(Class, String, Class, Class)
com.sun.javafx.fxml.BeanAdapter.getStaticGetterMethod(Class, String, Class)
a) Parsing an FXML with 100 stack panes in an AnchorPane with static setters takes ~100ms on average on my machine
b) Parsing an FXML with 100 stack panes in an AnchorPane without static setters takes ~8ms on average on my machine
c) Creating the same scene tree as in a) programmatically takes ~2ms on average on my machine