[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:
Relates
relates to YANGTOOLS-761 Remove SchemaNode hashCode()/equals() Resolved
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.


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