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

Use flyweight EffectiveStatement implementations

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 8.0.0
    • parser
    • None

    Description

      Most EffectiveStatement subtrees are inlined via grouping/uses mechanics, which we gain control of via YANGTOOLS-694.

      Since most effective statements have a SchemaPath, their state depends on it and thus we cannot reasonably share state – this property cascades to parent substatement list – hence we can share very little.

      Once we get rid of SchemaPath, though, each effective statement's state is (mostly?) dominated by its QName (which dictates substatements' QNames, etc.), hence we can deploy a very efficient flyweight pattern, where we maintain a QNameModule -> template cache and aggressively reuse effective statements.

      Attachments

        Issue Links

          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: