<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:54 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-999] Rework NodeIdentifierWithPredicates</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-999</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Heap dump analysis from &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1898&quot; title=&quot;Improve NormalizedNodeData{Input,Output} QName coding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1898&quot;&gt;&lt;del&gt;CONTROLLER-1898&lt;/del&gt;&lt;/a&gt; shows that a typical openflow-related workload does not use more than one predicates anywhere &#8211; every one of the 1.4M objects has exactly one predicate.&lt;/p&gt;

&lt;p&gt;This translates to 1.4M SharedSingletonMap instances, each costing a 24 bytes of storage &#8211; for a total of 34MiB, i.e. 3.7% of total memory footprint.&lt;/p&gt;

&lt;p&gt;Current layout of NodeIdentifierWithPredicates results in 32/40 bytes per instance, with 7 bytes being wasted on alignment &#8211; hence we could inline the single key/value eliminating the need for retained secondary objects.&lt;/p&gt;

&lt;p&gt;While straightforward, this will result in a Map, which will not retain a cached hashCode, hence is subject to trade-offs and further design.&lt;/p&gt;

&lt;p&gt;Irrespective of that, we need to turn this class into a non-final value-based object, i.e. eliminate all of its public constructors, so that users are no longer strongly connected to its design.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="31720">YANGTOOLS-999</key>
            <summary>Rework NodeIdentifierWithPredicates</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 May 2019 13:18:44 +0000</created>
                <updated>Sun, 10 Apr 2022 18:36:03 +0000</updated>
                            <resolved>Tue, 3 Sep 2019 18:38:00 +0000</resolved>
                                                    <fixVersion>4.0.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                                                            <comments>
                            <comment id="66837" author="rovarga" created="Thu, 30 May 2019 18:36:13 +0000"  >&lt;p&gt;With &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-1001&quot; title=&quot;Reconsider AbstractPathArgument hashCode()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-1001&quot;&gt;&lt;del&gt;YANGTOOLS-1001&lt;/del&gt;&lt;/a&gt; the math changes a bit, as the paddings are eliminated and NIWP is 24/32 bytes. With 24/32 bytes expended on SharedSingletonMap cost it boils down to a combined overhead of 48/64 bytes.&lt;/p&gt;

&lt;p&gt;If we inline the single-predicate case, we will arrive at 32/40 bytes per instance size, with the weird problem of having to deal with the Map return. Ideally this implementation would also implement Map, but that would imply hashCode/equals contract, which we have to set differently. If we disregard hashcode caching for the singleton map, we can be giving out singleton instances on demand &#8211; which may or may not work out okay. Alternatively we can bloat a bit, keeping the hashCode for the map inside the NIWP instance (hence growing it to 32/48 bytes) and give out non-static maps which update the hashCode in NIWP.&lt;/p&gt;</comment>
                            <comment id="66838" author="rovarga" created="Thu, 30 May 2019 18:41:47 +0000"  >&lt;p&gt;Looking at the users, it seems the best option is to eliminate the Map return completely, or at least make it an optional secondary interface. Most callers are interested in the keyset/entryset/values and those could be supported without this conundrum. If we structure access correctly, we can also simplify equality contract, as zero-or-multiples would be handled by one class and singletons by another &#8211; thus also allowing for reasonable hashCode behavior.&lt;/p&gt;</comment>
                            <comment id="67214" author="rovarga" created="Tue, 3 Sep 2019 18:38:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/yangtools/+/82604/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/yangtools/+/82604/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                            <subtask id="31721">YANGTOOLS-1000</subtask>
                    </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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03o1j:</customfieldvalue>

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