Details
-
Improvement
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
Description
A simply-booted SP Edition contains 271623 org.opendaylight.yangtools.yang.common.QName instances, which eat up 86911936 bytes of memory (26783936 with retained objects), making it the top org.opendaylight object.
The second most favorite is org.opendaylight.yangtools.yang.model.api.SchemaPath, with 250099 instances, 6002376 bytes and 34274552 retained (this includes QNames).
Heap analysis points at possible savings of about 13MB on duplicated strings. We now have an object cache API, which will clearly be useful for these objects. Implement the proper usage.
Note that QNames are allocated from binding classes, so any strings retained in the cache have to be copies.