JDK-8252935 : Add treeShowing listener only when needed
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: 9,openjfx11,openjfx15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-09-08
  • Updated: 2022-07-13
  • Resolved: 2021-02-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx17Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
JDK-8090322 added an internal treeShowing property that tracks whether a node is both treeVisible and showing (i.e., attached to a scene that is attached to a window that is showing).

This causes a listener to be added to the Scene for each node in the scene, making it expensive to add and remove nodes from the scene graph. A performance optimization would be to compute this only for the subset of UI controls need to know whether a node is treeShowing.

Comments
After this has baked in FX 17 for a while, we should consider backporting this to FX 11 (perhaps for the July CPU 11.0.12 release).
20-02-2021

Changeset: 47338244 Author: John Hendrikx <jhendrikx@openjdk.org> Committer: Kevin Rushforth <kcr@openjdk.org> Date: 2021-02-20 14:11:38 +0000 URL: https://git.openjdk.java.net/jfx/commit/47338244
20-02-2021

This is one of 4 discrete performance issues split out from JDK-8185886. It is under review here: https://github.com/openjdk/jfx/pull/185
08-09-2020