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.