I used the no instrumentation branch with the IntelliJ profiler. Didn't
see any performance issues.
If you are adding enough nodes while also having a lot of stylesheets to
arrive at a heap size of ~600MB, there is a performance impact in
general even without using this branch.
On 06/02/2026 16:01, Andy Goryachev wrote:
This is an interesting result, thanks for testing! It sort of matches
my result - not quite 10%, but then again it's not a complete set of
properties/classes. I wonder if doing this trick for Region and
Labeled should release even more memory.
Did you run the branch with no instrumentation and used VisualVM? Did
you notice any impact on performance?
Thanks!
-andy
*From: *Christopher Schnick <[email protected]>
*Date: *Thursday, February 5, 2026 at 20:29
*To: *Andy Goryachev <[email protected]>
*Cc: *OpenJFX <[email protected]>
*Subject: *[External] : Re: Experiment: Node properties
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