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

Parser: duplicate TypeStatementImpl objects

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Highest
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      Analysis of a memory snapshot with vendor models shows we end up with a SchemaContext which weighs about 240MB. Further analysis of duplicate objects shows we have ~12000 instances of TypeStatementImpl wasting ~2MB, which refer to simple yang types:
      argument&rawArgument == "string", "uint32", etc.
      source == DECLARATION
      definition == TYPE
      substatemebts == ImmutableList.of()

      Pre-allocate instances for all YANG basic types (e.g. not decimal64 and similar) and make sure to squash these duplicates to singleton instances.

      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: