<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:30 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-854] Expose statefulness of SourceSpecificContext to  StatementStreamSource</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-854</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;The decoupling of spi.source.StatementStreamSource (source), spi.source.StatementWriter (glue interface) and reactor.SourceSpecificContext (reused receiver) is a sound one from API/implementation decoupling, but given we iterate through each source four times (pre-linkage, linkage, statement definition, full definition), StatementStreamSource implementations end up processing statements multiple times.&lt;/p&gt;

&lt;p&gt;For each such statement, there are multiple lookups/allocations going on:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;statement name&lt;/li&gt;
	&lt;li&gt;statement argument&lt;/li&gt;
	&lt;li&gt;statement definition&lt;/li&gt;
	&lt;li&gt;statement source reference&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;before we dispatch to StatementWriter.startStatement(), which in turn dispatches to SourceSpecificContext.createDeclaredChild(), which ends up not using these objects at all and returns an existing object.&lt;/p&gt;

&lt;p&gt;There are situations where a statement can be fully defined in statement definition phase, in which case they can be completely skipped in StatementStreamSource and processed by SourceSpecificContext (or StatementContextWriter), as it already has a full and accurate view of the statement contents, including all substatements.&lt;/p&gt;

&lt;p&gt;StatementStreamSource and SourceSpecificContext already have a way of uniquely identifying statements &#8211; which is their offset at their nesting level. It is a simple int assigned by StatementStreamSource, which does not require any heavy lifting on StatementStreamSource&apos;s part and requires only simple (potentially recursive) lookup on SourceSpecificContext&apos;s part (which is already done anyway).&lt;/p&gt;

&lt;p&gt;Using this glue identifier it should be possible to communicate above four bits of information from SourceSpecificContext back to StatementStreamSource, such that it can reuse this information without incurring repetitive work. Fully-defined statements can be marked as such if StatementStreamSource has not skipped any unknown statements during recursive walk of children in SourceSpecificContext when StatementStreamSource invokes StatementWriter.endStatement().&lt;/p&gt;

&lt;p&gt;If we design a walk protocol with this communication in place, we can:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;skip statement lookups in StatementStreamSource&lt;/li&gt;
	&lt;li&gt;completely offload phase processing of already-fully-defined statements to SourceSpecificContext/StatementContextWriter&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This will lead to more CPU/memory efficient statement streaming, especially during full statement definition phase.&lt;/p&gt;</description>
                <environment></environment>
        <key id="29281">YANGTOOLS-854</key>
            <summary>Expose statefulness of SourceSpecificContext to  StatementStreamSource</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</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>Mon, 26 Feb 2018 18:49:39 +0000</created>
                <updated>Tue, 27 Feb 2018 13:00:52 +0000</updated>
                            <resolved>Tue, 27 Feb 2018 13:00:52 +0000</resolved>
                                                    <fixVersion>2.0.2</fixVersion>
                                    <component>parser</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="61253" author="rovarga" created="Tue, 27 Feb 2018 12:20:40 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/68811&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/68811&lt;/a&gt; infrastructure and YangStatementStream conversion&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/68814&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/68814&lt;/a&gt; YinStatementStream conversion&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="23133">YANGTOOLS-713</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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03asn:</customfieldvalue>

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