[
https://issues.jboss.org/browse/ISPN-4678?page=com.atlassian.jira.plugin....
]
Martin Gencur commented on ISPN-4678:
-------------------------------------
Hmm, growing by 1.5 factor instead of 2 is possible. This would require a perf. test to
actually see what is better, and for different types of data. I wouldn't like to
over-engineer this, though. Maybe growing by factor of 2 is still better than 1.5.
Also, I still think it makes sense to store only the actual data, not more. The time it
takes to copy the byte array seems very small compared to the whole chain of invocations
that happen in Infinispan. And it also appears that storing smaller data has a very
positive effect on performance.
Trim down ExpandableMarshalledValueByteStream to the actual data
length before storing in cache
-----------------------------------------------------------------------------------------------
Key: ISPN-4678
URL:
https://issues.jboss.org/browse/ISPN-4678
Project: Infinispan
Issue Type: Enhancement
Components: Core
Affects Versions: 7.0.0.Beta1
Reporter: Martin Gencur
Assignee: Martin Gencur
When storeAsBinary configuration flag is used, the ExpandableMarshalledValueByteStream is
used to serialize objects to byte arrays.
However, for value size up to 4kB, almost half of the space for each cache entry can be
wasted because the ByteStream is stored as is - with the additional space for future
expansion.
For value size greater than 4kB, only additional 25% of actual value size can be wasted.
But as these values can be quite large, the wasted space gets bigger too.
It is not necessary to store ExpandableMarshalledValueByteStream as is and can be
shrinked to actual data size before storing in cache.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)