[ 
https://issues.apache.org/jira/browse/APEXMALHAR-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351984#comment-15351984
 ] 

Munagala V. Ramanath commented on APEXMALHAR-2126:
--------------------------------------------------

+1 for this idea


> 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)

Reply via email to