<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
LazyConstants do not fit this use case exactly, I think, especially if we consider skipping initialization in the setter if the default value is used.</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);">
-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>Nir Lisker <nlisker@gmail.com><br>
<b>Date: </b>Thursday, February 12, 2026 at 11:17<br>
<b>To: </b>Andy Goryachev <andy.goryachev@oracle.com><br>
<b>Cc: </b>openjfx-dev <openjfx-dev@openjdk.org>, Marius Hanl <mariushanl@web.de><br>
<b>Subject: </b>[External] : Re: Experiment: Node properties<br>
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
There's LazyConstants in the works for cases like these.</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
(<a href="https://openjdk.org/jeps/526" data-outlook-id="30e1650e-b0e0-4b99-8412-c93498bf846e">https://openjdk.org/jeps/526</a>). Has it been looked at for this optimization?</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="gmail_attr" style="direction: ltr;">On Thu, Feb 12, 2026, 19:52 Marius Hanl <<a href="mailto:mariushanl@web.de" data-outlook-id="b5ef6730-87d7-418b-a1c4-f07029830fe0">mariushanl@web.de</a>> wrote:</div>
<blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);">
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);">I also like the idea. I, once had a similar idea but not enough time to do a deep check. In my opinion, we should make as much lazy as possible, as subclasses and developers often just use a small set of properties
really. <br>
<br>
</span>What I also had a look back then is default values for properties, like focusTraversable. Right now, changing default values (via the setter) in the constructor will initialize the property, even if otherwise we never need it (like pickOnBounds, focusTraversable,
...). Back then, I thought about improving this by using a mechanism which is already there (but not implemented consistently and used everywhere), that is methods like Control.getInitialFocusTraversable(), which could work in a way without initializing this
100 of times (like in case of Cell).</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
So maybe, we can save a bit more by not initializing properties by (essentially) changing the default value of it (therefore the getter).</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
Calling the getter in most cases in JavaFX does not yet initialize the property itself.</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
The biggest benefits will probably be tables, as they have rows (cells) with cells, that can add up quite fast with many columns. Running more optimized on a RaspberryPi is also good thing.</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
</div>
<div class="gmail_quote" style="font-family: verdana; font-size: 12px; color: rgb(0, 0, 0);">
-- Marius</div>
<div id="m_5127614255040178329sub-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>Mittwoch, 4. Februar 2026 um 22:17</div>
<div><b>Von: </b>"Andy Goryachev" <<a href="mailto:andy.goryachev@oracle.com" target="_blank" rel="noreferrer" data-outlook-id="476999d6-4c45-467b-971c-78969ece4fa8">andy.goryachev@oracle.com</a>></div>
<div><b>An: </b>OpenJFX <<a href="mailto:openjfx-dev@openjdk.org" target="_blank" rel="noreferrer" data-outlook-id="8804dc42-6d35-4188-93e4-8d5667742e38">openjfx-dev@openjdk.org</a>></div>
<div><b>Betreff: </b>Experiment: Node properties</div>
</div>
<div 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 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 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>
<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 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>
<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);">
Cheers,</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);">
<b>References</b></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);">
[0] <a href="https://urldefense.com/v3/__https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md__;!!ACWV5N9M2RV99hQ!LkxecXmsYrYMK2xpdieu9tpnOW9B6pGzfWi57fBffVOZuiCBTmBVqqLvncIYTbtkHJumP-9-v78Vv6p0adPK$" target="_blank" rel="noopener noreferrer noreferrer" data-outlook-id="61707335-631f-4fbb-a329-54fe12dd9159">
https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Experiments/NodeProperties.md</a></div>
<div style="direction: ltr; font-family: "Iosevka Fixed SS16", Arial, Helvetica, sans-serif; font-size: 12pt;">
</div>
</div>
</blockquote>
</div>
</body>
</html>