I profiled a Swing desktop app successfully for years now using the cpu recording. When I added a JavaFX view like follows:
var fxPanel = new JFXPanel();
this.add(fxPanel);
Platform.runLater(() -> {
var root = new BorderPane();
Scene scene = new Scene(root, Color.WHITE);
fxPanel.setScene(scene);
});
and try to profile the gui I create inside the BorderPane
called root
, nothing related to JavaFX is showing up in the call tree.
There is a user action that adds many JavaFX nodes and even takes over a second to complete on the JavaFX Application Thread, but still there is nothing in the JProfiler call tree. How can I profile the JavaFX gui creation call tree?
I'm starting JProfiler 13.0.7 from IntelliJ on a macOS Sonoma 14.5.
nothing related to JavaFX is showing up in the call tree.
What shows up in the call tree is determined by the call tree filters in JProfiler. By default, a new session has a list of "compact" filters:
which means that only the first call into such classes from profiled classes will be shown, but the internal call structure will not.
All classes that are not included by these filters will be profiled.
It is recommended to delete this default and add your own top-level packages as "profiler" filters. This will be done automatically if you use an IDE integration. With "profiled" filters, the dialog looks like this:
In your case, start profiling from IntelliJ and edit the "call tree filters" from the "Session startup dialog":
There you can check if the package that contains your JavaFX application is included in the call tree filters.