You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by "bright chen (JIRA)" <ji...@apache.org> on 2016/06/27 19:59:52 UTC
[jira] [Created] (APEXMALHAR-2126) Suggest: Share Slice Buffer
bright chen created APEXMALHAR-2126:
---------------------------------------
Summary: Suggest: Share Slice Buffer
Key: APEXMALHAR-2126
URL: https://issues.apache.org/jira/browse/APEXMALHAR-2126
Project: Apache Apex Malhar
Issue Type: Improvement
Reporter: bright chen
I think the intention of Slice(com.datatorrent.netlet.util.Slice) was to share the buffer and avoid unnecessary memory allocation/deallocation. But the intension is not self-explain and lack of method to share the memory. And the util class org.apache.apex.malhar.lib.utils.serde.SliceUtils also create new memory and copy the data.
I suggest to implement another class(Say BufferSlice), which
- initialize buffer with relative large buffer
- support append(byte[] data, int offset, int length)
- dynamic reallocated buffer or throw exception when buffer is full ( based on the management strategy)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)