<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:27 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-166] Generated builder cpu/memory efficiency</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-166</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;The builders we generate are not entirely memory/cpu efficient. Specifically the way augmentations are retained is sub-optimal, creating undue pressure. A typical object looks like this:&lt;/p&gt;


&lt;p&gt;    private static final class TlvsImpl implements Tlvs {&lt;/p&gt;

&lt;p&gt;        public Class&amp;lt;org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs&amp;gt; getImplementedInterface() &lt;/p&gt;
{
            return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs.class;
        }

&lt;p&gt;        private final OfList _ofList;&lt;br/&gt;
        private Map&amp;lt;Class&amp;lt;? extends Augmentation&amp;lt;org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs&amp;gt;&amp;gt;, Augmentation&amp;lt;org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs&amp;gt;&amp;gt; augmentation = new HashMap&amp;lt;&amp;gt;();&lt;/p&gt;

&lt;p&gt;        private TlvsImpl(TlvsBuilder builder) &lt;/p&gt;
{
            this._ofList = builder.getOfList();
            this.augmentation.putAll(builder.augmentation);
        }

&lt;p&gt;Note how &quot;augmentation&quot; allocation is disconnected from the actually filling &amp;#8211; this potentially inefficient. So move the allocation from field to constructor, so we can size the map appropriately.&lt;/p&gt;

&lt;p&gt;Second, most of augmentation instances end up being empty or only a few entries. So check for these circumstances and allocate optimized versions of these maps:&lt;/p&gt;

&lt;p&gt;switch (builder.augmentation.size()) {&lt;br/&gt;
case 0:&lt;br/&gt;
    this.augmentation = Collections.emptyMap();&lt;br/&gt;
    break;&lt;br/&gt;
case 1:&lt;br/&gt;
    final MapEntry&amp;lt;...&amp;gt; e = builder.augmentation.entrySet().iterator().next();&lt;br/&gt;
    this.augmentation = Collections.singletonMap(e.getKey(), e.getValue());&lt;br/&gt;
    break;&lt;br/&gt;
default:&lt;br/&gt;
    this.augmentation = new HashMap&amp;lt;&amp;gt;(builder.augmentation);&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;This change is API-safe and should be applied to hydrogen/stable as well.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22586">YANGTOOLS-166</key>
            <summary>Generated builder cpu/memory efficiency</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <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="mvitez@cisco.com">Martin Vitez</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 May 2014 05:54:34 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:06 +0000</updated>
                            <resolved>Fri, 16 May 2014 12:30:00 +0000</resolved>
                                                                        <due>Tue, 20 May 2014 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="42757" author="mvitez@cisco.com" created="Fri, 16 May 2014 08:58:55 +0000"  >&lt;p&gt;Proposed patch: &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/7106/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/7106/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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>1021</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=1021]]></customfieldvalue>

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

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

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