From issues-return-82104-apmail-spark-issues-archive=spark.apache.org@spark.apache.org Tue Dec 1 00:17:12 2015 Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48A5A18107 for ; Tue, 1 Dec 2015 00:17:11 +0000 (UTC) Received: (qmail 43339 invoked by uid 500); 1 Dec 2015 00:17:11 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 43271 invoked by uid 500); 1 Dec 2015 00:17:11 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 43184 invoked by uid 99); 1 Dec 2015 00:17:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2015 00:17:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 078972C1F6E for ; Tue, 1 Dec 2015 00:17:11 +0000 (UTC) Date: Tue, 1 Dec 2015 00:17:11 +0000 (UTC) From: "Apache Spark (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-12060) Avoid memory copy in JavaSerializerInstance.serialize MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-12060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15032769#comment-15032769 ] Apache Spark commented on SPARK-12060: -------------------------------------- User 'zsxwing' has created a pull request for this issue: https://github.com/apache/spark/pull/10051 > Avoid memory copy in JavaSerializerInstance.serialize > ----------------------------------------------------- > > Key: SPARK-12060 > URL: https://issues.apache.org/jira/browse/SPARK-12060 > Project: Spark > Issue Type: Improvement > Reporter: Shixiong Zhu > > 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: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org