[YANGTOOLS-367] yang-data-impl: decrease memory overhead of wrapped maps Created: 13/Nov/14  Updated: 10/Apr/22  Resolved: 01/Dec/14

Status: Resolved
Project: yangtools
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
Platform: All


Issue Links:
Blocks
is blocked by YANGTOOLS-374 Continuous WARN logs org.opendaylight... Resolved

 Description   

Profiling of a large-ish dataset loaded into the datastore has shown that we waste quite a bit of memory on UnmodifiableMap instances. As it turns out, our use of them leaves two out of three internal fields unused, which translates to pure overhead of 8 bytes per instance (in keySet and entrySet fields).

Create a minimal wrapper class, which will be defensive enough, which will only cache the values() field.



 Comments   
Comment by Robert Varga [ 13/Nov/14 ]

https://git.opendaylight.org/gerrit/12815

Generated at Wed Feb 07 20:53:01 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.