I tested it with our application that creates a lot of nodes, and the
heap was reduced by around 25-50MB on a ~600MB heap. But that was with
putting as much nodes as possible on the screen.
So yeah it's definitely nice to have if it doesn't introduce a lot of
other complexity and potential issues.
On 05/02/2026 21:29, Andy Goryachev wrote:
To take it further, decreasing the cost of rarely used properties in
the Node class (or the Node class hierarchy should this idea gains
traction) would make it possible to add more convenience properties
such as boundsOnScreen, owningWindow, etc.
-andy
*From: *openjfx-dev <[email protected]> on behalf of Andy
Goryachev <[email protected]>
*Date: *Wednesday, February 4, 2026 at 13:17
*To: *OpenJFX <[email protected]>
*Subject: *Experiment: Node properties
I would like to share the results of a little experiment involving
optimization of storage of Node properties. The basic idea is to
create a compact fast map-like container to hold the rarely
instantiated properties in order to reduce the application memory
footprint.
The savings are not overwhelming, but not exactly zero. I would
imagine this optimization might be more interesting in any resource
constrained environment such as Android / iOS / RaspberryPi. Please
refer to [0] for the details.
I encourage you to try it with your application, to see whether you
notice any change in memory consumption and/or performance. Let me
know what you think!
Cheers,
-andy
*References*
[0]
https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md