Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-454

Differentiate YangInstanceIdentifier

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: