Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 41512 invoked from network); 2 Jul 2008 18:16:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2008 18:16:36 -0000 Received: (qmail 15898 invoked by uid 500); 2 Jul 2008 18:16:37 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 15801 invoked by uid 500); 2 Jul 2008 18:16:37 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 15791 invoked by uid 99); 2 Jul 2008 18:16:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 11:16:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 18:15:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 10253234C14E for ; Wed, 2 Jul 2008 11:15:45 -0700 (PDT) Message-ID: <1152685252.1215022545061.JavaMail.jira@brutus> Date: Wed, 2 Jul 2008 11:15:45 -0700 (PDT) From: "Andrew Cornwall (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance) In-Reply-To: <1124840569.1214935365200.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Cornwall closed HARMONY-5888. ------------------------------------ Patch applied as expected. Thanks! > [classlib][pack200] Segment.writeJar is writing unbuffered (performance) > ------------------------------------------------------------------------ > > Key: HARMONY-5888 > URL: https://issues.apache.org/jira/browse/HARMONY-5888 > Project: Harmony > Issue Type: Improvement > Components: Classlib > Affects Versions: 5.0M6 > Environment: Pack200 head > Reporter: Andrew Cornwall > Assignee: Sian January > Fix For: 5.0M7 > > Attachments: main.patch > > > The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back. > The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!) > This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.