Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 BB097B107 for ; Fri, 6 Jan 2012 20:59:02 +0000 (UTC) Received: (qmail 4804 invoked by uid 500); 6 Jan 2012 20:59:02 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 4564 invoked by uid 500); 6 Jan 2012 20:59:01 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 4510 invoked by uid 99); 6 Jan 2012 20:59:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2012 20:59:00 +0000 X-ASF-Spam-Status: No, hits=-2001.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2012 20:58:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DEC3913B8F8 for ; Fri, 6 Jan 2012 20:58:39 +0000 (UTC) Date: Fri, 6 Jan 2012 20:58:39 +0000 (UTC) From: "Eli Collins (Updated) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1123143381.16282.1325883519913.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HDFS-554) BlockInfo.ensureCapacity may get a speedup from System.arraycopy() 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/HDFS-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eli Collins updated HDFS-554: ----------------------------- Target Version/s: 0.23.1 Good candidate for merging to branch 23. > BlockInfo.ensureCapacity may get a speedup from System.arraycopy() > ------------------------------------------------------------------ > > Key: HDFS-554 > URL: https://issues.apache.org/jira/browse/HDFS-554 > Project: Hadoop HDFS > Issue Type: Improvement > Components: name-node > Affects Versions: 0.21.0 > Reporter: Steve Loughran > Assignee: Harsh J > Priority: Minor > Fix For: 0.24.0 > > Attachments: HDFS-554.patch, HDFS-554.txt, HDFS-554.txt > > > BlockInfo.ensureCapacity() uses a for() loop to copy the old array data into the expanded array. {{System.arraycopy()}} is generally much faster for this, as it can do a bulk memory copy. There is also the typesafe Java6 {{Arrays.copyOf()}} to consider, though here it offers no tangible benefit. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira