Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 13045 invoked from network); 9 Jul 2008 15:28:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 15:28:28 -0000 Received: (qmail 70828 invoked by uid 500); 9 Jul 2008 15:28:27 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 70796 invoked by uid 500); 9 Jul 2008 15:28:27 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 70785 invoked by uid 99); 9 Jul 2008 15:28:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 08:28:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sianjanuary@googlemail.com designates 209.85.198.248 as permitted sender) Received: from [209.85.198.248] (HELO rv-out-0708.google.com) (209.85.198.248) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 15:27:33 +0000 Received: by rv-out-0708.google.com with SMTP id k29so3026176rvb.0 for ; Wed, 09 Jul 2008 08:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=YytJ0+1HL7zMtpsYb56Mr1n5wPVcWBhGOY1jlRuvPYQ=; b=yFlXBthfnEMWubiv6KJXXz/A/pr1NKa68I5L74DsjgQwi9R5Vy8Y9P5PZRuZkbWUf3 QqsheV4iEC+Q/HHu3639CfJM/ZuK5oA/jweAfl2FeIXdZP4cDtl+/0JU8AHyBjKsy5Ky E/pgcZMFt7DbDa3B1gVitQHPgUc5VwCcFknEQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=rnigKZEoAYmtpnlvjnuPLg1cE9gV3XRsrb7093knYWYJhJ9+MhgLyUJ/MPUPv2nYm5 Y4DAIVtVKBW47DuFM+r8Bf/zULexjcz6oISQtutLt1M5YDnBvIodCmiJiSFkB/IUIWm4 QcLCa6X/o4CtqBE4M8/Ucbwjwotu3uFCCc+Gw= Received: by 10.141.170.10 with SMTP id x10mr4053214rvo.221.1215617275191; Wed, 09 Jul 2008 08:27:55 -0700 (PDT) Received: by 10.141.21.3 with HTTP; Wed, 9 Jul 2008 08:27:55 -0700 (PDT) Message-ID: Date: Wed, 9 Jul 2008 16:27:55 +0100 From: "Sian January" To: dev@harmony.apache.org Subject: Re: [classlib][pack200][performance] Profiling unpacking scenario In-Reply-To: <4bebff790807081043g4d42c754q53ff0006d2a170bf@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_707_12011049.1215617275154" References: <4bebff790807081043g4d42c754q53ff0006d2a170bf@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_707_12011049.1215617275154 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for doing that Aleksey. In fact I think Sun's was 20 or 30 times faster before we started doing any performance optimizations, but it looks like there's still some ground that we could make up! On 08/07/2008, Aleksey Shipilev wrote: > > Hi, > > I took the liberty of profiling of pack200 implementation on unpacking > scenario. Source data was obtained from Eclipse JDT jars, repacked in > single 60 Mb jar file, then packed with pack200 from Sun's JDK (-E9 > used), resulting in 20 Mb pack200-compressed file. Then Sun JDK > 1.6.0_05 (Windows, -server) was used together with hprof (cpu=time) to > obtain the profile. My patch from HARMONY-5900 is onboard. The head of > the profile looks like this: > > 4.76% org.apache.harmony.unpack200.bytecode.ClassConstantPool.addNested > 4.22% java.util.HashMap.getEntry > 2.99% java.util.AbstractList$Itr.next > 2.92% java.util.AbstractList$Itr.hasNext > 2.84% java.util.ArrayList.get > 2.43% java.util.AbstractList$Itr.next > 2.41% java.util.HashMap.containsKey > 2.15% org.apache.harmony.unpack200.IcBands.getRelevantIcTuples > 2.00% java.util.HashSet.contains > 1.57% java.io.DataOutputStream.writeUTF > > Composite occupancy: > > 18.4% java.util.AbstractList > 18.0% java.util.HashMap > 15.8% java.util.ArrayList > 10.5% o.a.h.unpack200.bytecode.ClassConstantPool.* > 5.3% o.a.h.unpack200.bytecode.CPUTF8.* (hashcode mostly) > 4.5% java.io.* > 4.5% java.lang.String.* > 4.4% o.a.h.unpack200.bytecode.ByteCode.* > 3.9% o.a.h.unpack200.bytecode.Ic{Tuple|Bands}.* > 14.7% other > > So the main concern is Collections usage. ClassConstantPool uses Lists > excessively, so I suspect the significant amount of time is spent > there. > > NB: > Timings for the scenario (the less the better): > Harmony's pack200: 67 secs > Sun's pack200: 6 secs > > Yep, 10 times faster. > > Thanks, > Aleksey. > -- Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU ------=_Part_707_12011049.1215617275154--