[
https://issues.apache.org/jira/browse/SPARK-12060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shixiong Zhu reopened SPARK-12060:
----------------------------------
Just found a lot places use `ByteBuffer.array` directly and this patch will
break them. Just reverted it before fixing the `ByteBuffer.array` issue.
> Avoid memory copy in JavaSerializerInstance.serialize
> -----------------------------------------------------
>
> Key: SPARK-12060
> URL: https://issues.apache.org/jira/browse/SPARK-12060
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Reporter: Shixiong Zhu
> Assignee: Shixiong Zhu
> Priority: Critical
> Fix For: 1.6.0
>
>
> JavaSerializerInstance.serialize uses ByteArrayOutputStream.toByteArray to
> get the serialized data. ByteArrayOutputStream.toByteArray needs to copy the
> content in the internal array to a new array. However, since the array will
> be converted to ByteBuffer at once, we can avoid the memory copy.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]