Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-694 Eliminate duplicate DescriptionEffectiveStatementImpl objects
  3. YANGTOOLS-1195

Shortcut InferredStatement.buildEffective() when no inference was done

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Medium Medium
    • 7.0.0
    • None
    • parser
    • None

      With all the work done in YANGTOOLS-784 we are now in a place where we have rather good command of substatement lifecycle so that unused substatement contexts get cleaned up.

      Unfortunately we still end up materializing substatements even when there was no inference and we may actually end up building an EffectiveStatement which is equal to our prototype.

      Devise a reactor-internal shortcut where InferredStatementContext can ask its prototype to provide an EffectiveStatement taking parent/history (and probably others) into account. This shortcut needs to be taken when InferredStatementContext.substatements is null – i.e. the difference is only in things InferredStatementContext has readily available.

       

            miro.kovac Miroslav Kovac
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: