[YANGTOOLS-1041] Index SchemaNode substatements lazily Created: 25/Nov/19 Updated: 27/Nov/19 Resolved: 27/Nov/19 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.3 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
There is a slight impedance between SchemaNode and EffectiveStatement interfaces, where SchemaNode provides a view of a certain class of substatements – for example UnknownSchemaNode, NotificationDefinition, etc. Since our statement implementations have all statements and we do not always use these views, we can make these derived collections lazily-computed with the use of VarHandles (to eliminate volatile reads). |