[YANGTOOLS-454] Differentiate YangInstanceIdentifier Created: 18/May/15 Updated: 10/Apr/22 Resolved: 19/May/15 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Description |
|
YangInstanceIdentifier has inherently two ways of construction: a fixed iterable from root, or concatenation. Current implementation is geared towards the later use case, where it takes advantage of Iterables.concat(). This has an unfortunate side-effect of not being able to efficiently implement getLastPathArgument(), which is used in binding codecs and will be used heavily in defensive precautions solving BUG-3189. Rework the implementation such that the two cases are differentiated, one using an internal ImmutableList, the other one keeping a reference to the YangInstanceIdentifier from which it was created (and storing a single PathArgument). This will have the effect of the fixed implementation improving on various operations, as well as the stacked implementation having lower overhead and being efficient in providing the last path argument. |
| Comments |
| Comment by Robert Varga [ 18/May/15 ] |
|
https://git.opendaylight.org/gerrit/20683 (split out builder) |