Eliminate duplicate DescriptionEffectiveStatementImpl objects (YANGTOOLS-694)

[YANGTOOLS-1195] Shortcut InferredStatement.buildEffective() when no inference was done Created: 03/Dec/20  Updated: 29/Jan/21  Resolved: 20/Jan/21

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Sub-task Priority: Medium
Reporter: Robert Varga Assignee: Miroslav Kovac
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to YANGTOOLS-1208 Migrate users of StatementPolicy.lega... Resolved
split to YANGTOOLS-1207 Do not populate namespaces during eff... Confirmed

 Description   

With all the work done in YANGTOOLS-784 we are now in a place where we have rather good command of substatement lifecycle so that unused substatement contexts get cleaned up.

Unfortunately we still end up materializing substatements even when there was no inference and we may actually end up building an EffectiveStatement which is equal to our prototype.

Devise a reactor-internal shortcut where InferredStatementContext can ask its prototype to provide an EffectiveStatement taking parent/history (and probably others) into account. This shortcut needs to be taken when InferredStatementContext.substatements is null – i.e. the difference is only in things InferredStatementContext has readily available.

 


Generated at Wed Feb 07 20:55:27 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.