Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 60407 invoked from network); 1 Jul 2008 18:03:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2008 18:03:42 -0000 Received: (qmail 22399 invoked by uid 500); 1 Jul 2008 18:03:38 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 22332 invoked by uid 500); 1 Jul 2008 18:03:38 -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 22068 invoked by uid 99); 1 Jul 2008 18:03:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 11:03: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; Tue, 01 Jul 2008 18:02:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 313DC234C153 for ; Tue, 1 Jul 2008 11:02:45 -0700 (PDT) Message-ID: <1124840569.1214935365200.JavaMail.jira@brutus> Date: Tue, 1 Jul 2008 11:02:45 -0700 (PDT) From: "Andrew Cornwall (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [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 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.