Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-99

Duplicate packageName instances in GeneratedTOBuilderImpl

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      A heap dump analysis shows 1093 duplicate Strings, wasting 190kB, all containing:

      "org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508"

      which are retained from GeneratedTOBuilderImpl and its inner classes.

      This looks like a failure to share the package name string across objects generated for a single model. Investigate ways how we can share instances to eliminate these duplicates.

      A quick grep through sources seems to point to BindingGeneratorUtil's packageNameForTypeDefinition() and packageNameForGeneratedType(). Both these functions look like they may end up needlessly duplicating an input string.

      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: