<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
John brings a good point about effects on performance, and no amount of explanation from both sides of the argument are going to help.  I believe the performance of small arrays will be surprisingly better than a hash table, but the only way to resolve this
 question is to measure.  I am planning to test it and will certainly share the results.</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If you are willing to try it out, you could run your app with jfx build from the branches mentioned earlier (I've synced them up with the latest master).</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
To measure the heap consumption changes, you can use VisualVM, make sure to set FastMap.COLLECT_STATISTICS to false.  With statistics enabled, you'll see some stdout but those are just estimates, so I wouldn't trust them much.</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Measuring the impact of performance is more difficult.  One test that might get <i>
some</i> idea is to time the startup of the app, since it involves massive creation of Nodes, application of CSS, and many other things in a burst.  It's probably best to launch several times and pick the best time, to reduce the effect of disk caches etc.</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also, keep in mind that, theoretically, there are more properties that can be classified as "rare", so we might see even more improvement should we deem this idea worthwhile.</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Another benefit is that it will be easier to add convenience properties instead of constructing Subscription chains.</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Let us know what you find out.</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-andy</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>Marius Hanl <mariushanl@web.de><br>
<b>Date: </b>Wednesday, February 25, 2026 at 11:01<br>
<b>To: </b>john.hendrikx@gmail.com <john.hendrikx@gmail.com>, Andy Goryachev <andy.goryachev@oracle.com>, openjfx-dev@openjdk.org <openjfx-dev@openjdk.org><br>
<b>Subject: </b>Re: [External] : Re: Experiment: Node properties<br>
<br>
</div>
<div dir="ltr" lang="en" id="pfptBannerej0nkli" style="visibility: visible !important; opacity: 1 !important; max-width: none !important; max-height: none !important; display: block !important; text-align: left !important; margin: 0px 0px 10px !important; padding: 7px 16px 8px !important; border-radius: 4px !important; min-width: 200px !important; background-color: rgb(96, 190, 235); border-top-width: 4px !important; border-top-style: solid !important; border-top-color: rgb(129, 147, 160) !important;">
<div id="pfptBannerej0nkli" style="visibility: visible !important; opacity: 1 !important; background-color: rgb(96, 190, 235); max-height: none !important; float: left !important; display: block !important; margin: 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannerej0nkli" style="opacity: 1 !important; max-width: none !important; max-height: none !important; display: block !important; visibility: visible !important; background-color: rgb(96, 190, 235); color: rgb(0, 0, 0); font-family: Arial, sans-serif !important; font-weight: bold !important; font-size: 14px !important; line-height: 1.29 !important;">
This Message Is From an Untrusted Sender</div>
<div id="pfptBannerej0nkli" style="font-weight: normal; opacity: 1 !important; max-width: none !important; max-height: none !important; display: block !important; visibility: visible !important; background-color: rgb(96, 190, 235); color: rgb(0, 0, 0); font-family: Arial, sans-serif !important; font-size: 12px !important; line-height: 1.5 !important; margin-top: 2px !important;">
You have not previously corresponded with this sender.</div>
</div>
<div id="pfptBannerej0nkli" style="visibility: visible !important; opacity: 1 !important; background-color: rgb(96, 190, 235); max-width: none !important; max-height: none !important; float: right !important; display: block !important; margin-left: 16px !important; margin-top: 1px !important; text-align: right !important; width: fit-content !important; font-size: 12px !important;">
<div class="pfptPrimaryButtonej0nkli" style="white-space: nowrap; margin-top: 3px; margin-bottom: 3px; margin-left: 16px; padding: 7.5px 16px; border-width: 1px; border-style: solid; border-color: rgb(102, 102, 102); border-radius: 2px; width: fit-content; display: inline-block; font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(96, 190, 235);"><a href="https://us-phishalarm-ewt.proofpoint.com/EWT/v1/ACWV5N9M2RV99hQ!P92y3kIlEUDHNjoglxNe8W35-VFyXSOZUhFd19FhWbbhvLXCLQjEuwQjFsPmBDAC5oo8MYkWp56ID_EXmbsVoEXn0ha_sPZIVqpwHIWOUGbDNs5chWugVxtHCnuulc1NfT37q6FfJ5sJIeXiGHyBMy8FywkueD6HBh2Z2lgRphe1M3LGN5uSITi0$" id="pfptBannerej0nkli" data-outlook-id="a75a534f-862b-44f8-9610-c204c82452e3" style="text-decoration: none; display: inline-block; background-color: rgb(96, 190, 235); max-width: none; max-height: none;">Report Suspicious</a></span></div>
</div>
<div style="line-height: 0; height: 0px; display: block; font-size: 0.01px;"> </div>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);">I also agree with John here. Especially regarding the lookup, we should definitely use a hash based algorithm (HashMap?) with a reasonable default size.</span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);">hashCode really is not expensive, but we should recheck. </span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);"> </span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);">@Andy, when you did the changes / rechecked, I would be happy to test it with some applications.<br>
I usually set the compact object headers in those applications as well, so we will see how much we gain then. If there is something I should use or do (VisualVM?), just tell me to do so. I'm interested as well about the gains.</span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);"> </span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);">Marius</span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);"> </span></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);"> </span></div>
<div id="sub-body-container" style="margin:10px 5px 5px 10px; padding:10px 0px 10px 10px; border-left:2px solid rgb(195,217,229)">
<div style="margin: 0px 0px 10px;">
<div><b>Gesendet: </b>Dienstag, 24. Februar 2026 um 08:05</div>
<div><b>Von: </b>"John Hendrikx" <john.hendrikx@gmail.com></div>
<div><b>An: </b>"Andy Goryachev" <andy.goryachev@oracle.com>, "openjfx-dev@openjdk.org" <openjfx-dev@openjdk.org></div>
<div><b>Betreff: </b>[External] : Re: Experiment: Node properties</div>
</div>
<p>Thanks for the taking the time to respond.</p>
<div class="moz-cite-prefix">On 24/02/2026 00:32, Andy Goryachev wrote:</div>
<blockquote>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;"><span style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> What trade off are you making here?  It seems we're trading a small memory
 gain for more CPU use (extra indirection, walking a list linearly to find the correct property on each use/access VS no indirection, no list walking).</span></p>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You are right.  The tradeoff is non-zero memory gain (a few megabytes, to the tune of maybe 5% of total heap size) at the cost of extra CPU cycles.  The rationale is that even though we consume extra CPU, it's much less noticeable because of the cache-friendly
 implementation and non-zero positive impact on garbage collector (less memory to scan).</div>
</blockquote>
<p>What is more cache friendly about adding several extra indirections to get to a property's value?  Let me see:</p>
<p>Before:</p>
<p>- isFocusTraversable(): get property -> get value</p>
<p>After:</p>
<p>- isFocusTraversable(): get fast map -> get key ArrayList -> get internal array -> get value ArrayList -> get internal array -> get property -> get value</p>
<p>For the garbage collector, the properties are likely going to be in an area of the GC collector that will be scanned rarely, and not part of the frequent scans for young objects. I don't think we can generally conclude that having less memory used will have
 an overall positive impact on the GC here.  The properties will be seen as long-lived by the GC, and will reside in an area only scanned rarely, which has very little impact on the performance of most GC implementations.  </p>
<blockquote>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;"><span style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> Are the resource constrained platforms you named generally memory or CPU constrained?</span></p>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I asked Gluon for some feedback on iOS/Android.  However, my previous experience with a large trading application says that memory footprint savings outweighs the CPU cycles, so I would imagine we'll get a net gain even on the desktop.</div>
</blockquote>
<p>That's anecdotal, and will depend on the type of application, platform, CPU cores available, etc.  So while you may be correct for your trading application, it may be completely the opposite for a task tracking application. In general, memory use is hardly
 a factor for most applications; most Java apps don't even bother to limit the heap, yet complain about several GB's of memory use when they have a retained size of less than half a GB.  Not that I'm not in favor of reducing memory footprint, but I seriously
 wonder if there is much to gain at the property level.</p>
<p> </p>
<blockquote>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;"><span style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> Have you investigated a breakdown of JavaFX memory use, and did the amount
 of memory used by properties come out on top here?</span></p>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
There is some statistics provided in <a href="https://urldefense.com/v3/__https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md__;!!ACWV5N9M2RV99hQ!Ie39KHLQqoER4VeWP4KDgwa3XMIaPBzgSg5sb8HylkbYhnc-m6ZCEp47-JW4rGw_H6HC8QAiqE2XdTmaWPoLWy23$" target="_blank" class="moz-txt-link-freetext" rel="noopener noreferrer" data-outlook-id="a3f38d39-611c-4268-8d52-e3541708f080">
https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md</a> , please take a look.</div>
</blockquote>
I took a look, but could only find statistics about properties. I didn't see a breakdown of general JavaFX memory use (the other 95%) to see if properties are the lowest hanging fruit.<br>
<blockquote>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;"><span style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> Would the gains you made here become irrelevant or less relevant with Compact
 Object Headers [<a href="https://openjdk.org/jeps/519" target="_blank" class="moz-txt-link-freetext" rel="noopener noreferrer" data-outlook-id="e2ab6549-b8ea-4618-a12e-0f0c053d3d2d" style="margin-top: 0px; margin-bottom: 0px;">https://openjdk.org/jeps/519</a>]</span></p>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Compact Object Headers are almost irrelevant here - the stats that were collected count the number of pointers saved (assumed 8 bytes per pointer on 64 bit).  The stats ignore any other possible savings.</div>
</blockquote>
<p>Compact Object Headers is especially relevant here as you're optimizing small objects (properties) on which JEP519 offers the most relative gain.  Enabling it may reduce the 5% memory gain you measured to a smaller margin, which impacts the rationale for
 this change.</p>
<p>Furthermore, if we're talking about saving memory, I think we can assume we're using small heaps (less than 32 GB).  In that case, Hotspot will use 4 bytes per pointer (compressed OOPs) not 8, so your assumption of 8 bytes per pointer will be incorrect in
 the vast majority of JavaFX cases.</p>
<blockquote>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;"><span style="font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> I think the property look-up system cannot reasonably be List (FastMap despite
 its name is a List). Converting this to a map however is likely to require a small object (like Map.Entry) which will further reduce any gains you made here I think.</span></p>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The FastMap is a map-like (key-value) storage, even though it's implemented as an array.  There is a debate as to what would the most efficient implementation entail (a hashmap, one array, or two arrays like the POC currently uses).  The idea is not to put
<b>all</b>​ the properties into the container, but only the rarely used ones, with the end result of having a few (less than 4-6, say).  This makes the object small and cache-friendly, which further speeds up the access.</div>
</blockquote>
<p>I'm aware of the intentions to only put the rarely used properties there.  What is rarely used will depend on the application.  How many properties will end up being stored there also depends on the application.  What if the app does need several of these
 properties and this structure grows to contain 20-30 properties?</p>
<p>Currently your proposal wants to store these rarely used properties in an O(n) structure, whereas a hash based solutions are O(1), and where doing nothing is even faster as there is no map at all.</p>
<p>So although your map implementation may be small and cache friendly (that last point being debatable, see indirection count), it degrades badly when there are more than the predicted amount of properties, and requires many more indirections than the base
 case of doing nothing.</p>
<p>There is talk about not having to do an expensive `hashCode` call in your proposal.  First, `hashCode` is really cheap for objects not implementing equality as it falls back on the Object#hashCode.  I believe this is the case for properties.  Even if it
 isn't the case, you could use the identity hash code here (the `==` equivalent in the hashing world).</p>
<p>However that "expensive" call is what enables the O(1) lookup of the value you are interested in, which can be truly cache friendly with the right structure (array based open addressed map).</p>
<p>--John</p>
<blockquote>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks!</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-andy</div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>openjfx-dev <a href="mailto:openjfx-dev-retn@openjdk.org" target="_blank" class="moz-txt-link-rfc2396E" rel="noopener noreferrer" data-outlook-id="8285433a-dc21-4193-b293-445517b9b795">
<openjfx-dev-retn@openjdk.org></a> on behalf of John Hendrikx <a href="mailto:john.hendrikx@gmail.com" target="_blank" class="moz-txt-link-rfc2396E" rel="noopener noreferrer" data-outlook-id="b864ae1c-dc58-4105-bf5d-8b23fa1de11c">
<john.hendrikx@gmail.com></a><br>
<b>Date: </b>Thursday, February 19, 2026 at 15:28<br>
<b>To: </b><a href="mailto:openjfx-dev@openjdk.org" target="_blank" class="moz-txt-link-abbreviated" rel="noopener noreferrer" data-outlook-id="845e0c66-ba74-450e-9071-5391e432bcb9">openjfx-dev@openjdk.org</a>
<a href="mailto:openjfx-dev@openjdk.org" target="_blank" class="moz-txt-link-rfc2396E" rel="noopener noreferrer" data-outlook-id="3df3c59d-d40f-486a-b265-145d7d894d5c">
<openjfx-dev@openjdk.org></a><br>
<b>Subject: </b>Re: Experiment: Node properties<br>
<br>
</div>
<p class="ms-outlook-mobile-reference-message skipProofing"> </p>
<div class="moz-cite-prefix">On 04/02/2026 22:17, Andy Goryachev wrote:</div>
<blockquote>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
</blockquote>
<p class="ms-outlook-mobile-reference-message skipProofing">What trade off are you making here?  It seems we're trading a small memory gain for more CPU use (extra indirection, walking a list linearly to find the correct property on each use/access VS no indirection,
 no list walking).</p>
<p class="ms-outlook-mobile-reference-message skipProofing">Are the resource constrained platforms you named generally memory or CPU constrained?</p>
<p class="ms-outlook-mobile-reference-message skipProofing">Have you investigated a breakdown of JavaFX memory use, and did the amount of memory used by properties come out on top here?</p>
<p class="ms-outlook-mobile-reference-message skipProofing">Would the gains you made here become irrelevant or less relevant with Compact Object Headers [<a href="https://openjdk.org/jeps/519" target="_blank" class="moz-txt-link-freetext" rel="noopener noreferrer" data-outlook-id="e0a8ca20-b5c3-4715-9e02-6f26b4e571eb" style="margin-top: 0px; margin-bottom: 0px;">https://openjdk.org/jeps/519</a>]</p>
<p class="ms-outlook-mobile-reference-message skipProofing"> </p>
<blockquote>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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!</div>
</blockquote>
<p class="ms-outlook-mobile-reference-message skipProofing">I like the idea, but I wonder if there really is much to gain here, and whether those gains will hold up with future Java improvements.</p>
<p class="ms-outlook-mobile-reference-message skipProofing">I think the property look-up system cannot reasonably be List (FastMap despite its name is a List). Converting this to a map however is likely to require a small object (like Map.Entry) which will
 further reduce any gains you made here I think.</p>
<p class="ms-outlook-mobile-reference-message skipProofing">--John</p>
<blockquote>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-andy</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>References</b></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
[0] <a href="https://urldefense.com/v3/__https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md__;!!ACWV5N9M2RV99hQ!Ie39KHLQqoER4VeWP4KDgwa3XMIaPBzgSg5sb8HylkbYhnc-m6ZCEp47-JW4rGw_H6HC8QAiqE2XdTmaWPoLWy23$" target="_blank" class="moz-txt-link-freetext" rel="noopener noreferrer" data-outlook-id="497837bb-ac53-480c-8ae4-43db1414979f">
https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md</a></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
 </div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</body>
</html>