[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 |
||
| Issue Links: |
|
||||||||
| 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 ] |