Details
-
Enhancement
-
Resolution: Obsolete
-
Major
-
None
-
5.1.5.FINAL
-
None
-
None
Description
Buffers allocated by org.infinispan.io.ExpandableMarshalledValueByteStream grow by approximation, but in
org.infinispan.marshall.MarshalledValue.serialize0()
we know when the buffer won't grow any longer as it's going to be treated as effectively immutable. At this point we should shrink the buffer to potentially save memory on each entry in the datagrid.
This likely needs to be optional as depending on configuration the buffer might be used for a temporary operation, in which case the effort of resizing should be avoided.