<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:24 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[YANGTOOLS-490] Create SchemaContext-aware NormalizedNodes</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-490</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Our current implementation of NormalizedNode interface is completely generic, without being tied to the SchemaContext in which those nodes are being used.&lt;/p&gt;

&lt;p&gt;The implementation uses QName-&amp;gt;child maps to hold child entities, which is quite wasteful, as those maps typically have the same key set or differ by non-presence of some children.&lt;/p&gt;

&lt;p&gt;If a builder for a particular NormalizedNode were to know the SchemaNode of the entity being built, it could use that information to:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;A) Validate the NormalizedNode as it is being built&lt;/b&gt;, which should be an optional feature, consisting of the following functionality:&lt;/p&gt;

&lt;p&gt;A1) Checking for valid child QName&lt;br/&gt;
 A2) Checking value type conformance (no Strings where Integer is expected)&lt;br/&gt;
 A3) Checking value well-formedness (according to &apos;pattern&apos; and &apos;range&apos; statements)&lt;br/&gt;
 A4) Checking/converting value to the canonical representation&lt;br/&gt;
 A5) Checking NormalizedNode consistency (according to &apos;when&apos; and similar statements) when .build() is called&lt;/p&gt;

&lt;p&gt;&lt;b&gt;B) Shared child keying&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Given the finite-set of possible children, which we know from the SchemaNode, we can share the the information about which nodes are present across NormalizedNode instances in the global scope. This would lower the cost of keeping track of child values to:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;a Map&amp;lt;QName, Integer&amp;gt; shared across instances with the same keyset&lt;/li&gt;
	&lt;li&gt;a per-instance Object[] containing child references&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The Map can be implemented as an ImmutableMap, as the Integers involved will probably be coming from JVM&apos;s boxing cache.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;C) (Optional) Lazy leaf children&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;When a child leaf is being looked up, we get provided with its identifier (and by extension, its node type). This means that structurally we need to only retain the fact that the child exists and its value. We then can instantiate a wrapper object around the value without explicitly storing it.&lt;/p&gt;

&lt;p&gt;While this will potentially cause more object allocations to occur, our minimum memory footprint will go down, as we would not keep that wrapper object (of ~24 bytes) around.&lt;/p&gt;

&lt;p&gt;Note that in some access patterns the JVM can use escape analysis to eliminate the allocation completely. This obviously depends on what the access pattern is and whether the producer uses some sort of value-caching (such as reusing a single global LeafNode instance).&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22910">YANGTOOLS-490</key>
            <summary>Create SchemaContext-aware NormalizedNodes</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Aug 2015 19:57:55 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:36 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="67195" author="rovarga" created="Tue, 27 Aug 2019 08:17:25 +0000"  >&lt;p&gt;Part B) has been implemented as of Ib11b8d5adc4d5509ecbbba59348638f78fc2e62b, without relying on schema, through ImmutableOffsetMaps.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="31921">YANGTOOLS-1019</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="31922">YANGTOOLS-1020</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4158</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=4158]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10308"><![CDATA[New Feature]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10301"><![CDATA[Normal]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i027jr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>