[MDSAL-99] Duplicate packageName instances in GeneratedTOBuilderImpl Created: 05/Sep/15 Updated: 09/Mar/18 Resolved: 14/Sep/15 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: 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. |
| Comments |
| Comment by Robert Varga [ 05/Sep/15 ] |
|
https://git.opendaylight.org/gerrit/26555 BUG-4264: do not duplicate strings needlessly |