Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
MultiPartitionCacheTag relies on LinkedLists.
A LinkedList object that holds e.g. 2 nodes consumes 112 bytes roughly in this composition:
- 16 bytes for LinkedList object header
- 8 bytes for referring head
- 8 bytes for referring tail
- 80 = 2 x (16 bytes for LinkedList$Node header, 3 x 8 bytes for referring prev, next, item)
This is a lot, so I propose to replace LinkedList in MultiPartitionCacheTag with a simple String array. (For a similar scenario an array would take 16 + 8 + 2 x 8 = 40 bytes, as per header, count, and 2 references for our actual objects).