[YANGTOOLS-1068] Drop SchemaNode Set-returning methods to return Collection Created: 13/Jan/20 Updated: 28/Oct/20 Resolved: 16/Jan/20 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0 |
| 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: |
|
||||||||
| Epic Link: | Parser Performance | ||||||||
| Description |
|
Our reference implementation is based on EffectiveStatements, which means we do have a Collection of statements readily available. Things like getTypeDefinitions() are returning a Set require not only filtering that collection, but also making sure there are no duplicates, which are forcing us to eagerly process all substatements. Since users typically are only iterating over the returned Set, dropping to returning a Collection means we can evaluate the statements lazily, improving performance. |