From owner-freebsd-java  Sun Nov 26 12:58:57 2000
Delivered-To: freebsd-java@freebsd.org
Received: from topperwein.dyndns.org (acs-24-154-28-99.zoominternet.net [24.154.28.99])
	by hub.freebsd.org (Postfix) with ESMTP id 33AFF37B4CF
	for <java@freebsd.org>; Sun, 26 Nov 2000 12:58:50 -0800 (PST)
Received: from browning.pennasoft.com (browning [192.168.168.11])
	by topperwein.dyndns.org (8.11.1/8.11.1) with ESMTP id eAQKxf522706
	for <java@freebsd.org>; Sun, 26 Nov 2000 15:59:41 -0500 (EST)
	(envelope-from behanna@zbzoom.net)
Date: Sun, 26 Nov 2000 16:03:26 -0500 (EST)
From: Chris BeHanna <behanna@zbzoom.net>
Reply-To: behanna@zbzoom.net
To: java@freebsd.org
Subject: Re: Java et al
In-Reply-To: <Pine.BSF.4.21.0011210301180.90238-100000@snafu.adept.org>
Message-ID: <Pine.BSF.4.21.0011261552570.23974-100000@browning.pennasoft.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Tue, 21 Nov 2000, Mike Hoskins wrote:

> Excuse this if it's off-topic...  I couldn't think of the best place to
> ask this, and I am running STABLE on all production machines, so...
> 
> We have a lot of proprietary code written in Java running on Wintel
> boxes.  There's been talk of migrating to Linux, and our initial tests
> show performance equal to NT 4.0 under the JDK/JVM's we've tested.
> 
> Is there anyone out there running a lot of mission-critical
> (read: updating Oracle queues responsible for 911 dispatching) Java code
> under FreeBSD?

    I don't know that anyone will certify FreeBSD as OK for mission-
critical systems, and Java expressly disclaims suitability for mission-
critical applications.  IMHO, this is CYA more than anything else--no
one wants to be sued if air traffic control software written in Java
running on FreeBSD or some other platform routes two jumbo jets to the
same runway at the same time.

> If so, I'd appreciate JDK/JVM reccomendations, OS tuning tips (or relevant
> FAQs), etc.  If not...  I guess I'll resign myself to letting penguins
> slowly infiltrate my network (ack!).

    On a system that has kernel threads (i.e., not FreeBSD 4.x, but
coming in 5.x, IIUC), IBM JDK 1.3 with HotSpot enabled is wicked fast
compared to Blackdown JDK 1.2.2 (note that Blackdown 1.3.0 just came
out recently, and I'm trying to get it up and running here--so far so
good, but it complains about alt sigstack allocations--apparently
Andrew Gallatin's Linux sighandling patches did not make it into 4.2).
On a platform that doesn't have native kernel threads (e.g., FreeBSD
4.x), HotSpot will still be faster than JDK 1.2.2 with sunwjit, but
the results will not be nearly as dramatic.  For now, IIUC, ShuJIT is
the hot JIT to use on FreeBSD.

    I am presently working on getting the native FreeBSD JDK 1.2.2
port to work, because I believe that will be the stable fallback to
use for other applications (e.g., Star Office).  Blackdown JDK 1.3.0
will be an interesting exercise, but as I mentioned, I have to apply
Andrew Gallatin's patches to my kernel first.

    FWIW, the Linux-JDK 1.2.2 port ran just dandy on 4.1.1-STABLE.

    Note, however, that you'll have the same issues running Oracle on
FreeBSD that you have running JDK 1.3.0--namely, Oracle will expect
some Linux signal-handling capabilities that only exist in Andrew
Gallatin's patches.

-- 
Chris BeHanna
Software Engineer
behanna@bogus.zbzoom.net   Remove "bogus" before responding.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Mon Nov 27 21: 9: 8 2000
Delivered-To: freebsd-java@freebsd.org
Received: from smtp10.atl.mindspring.net (smtp10.atl.mindspring.net [207.69.200.246])
	by hub.freebsd.org (Postfix) with ESMTP id 6322B37B479
	for <freebsd-java@freebsd.org>; Mon, 27 Nov 2000 21:09:05 -0800 (PST)
Received: from ix.netcom.com (col-oh34-85.ix.netcom.com [207.220.178.85])
	by smtp10.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id AAA00291;
	Tue, 28 Nov 2000 00:09:03 -0500 (EST)
Message-ID: <3A233E6D.20C3E9DF@ix.netcom.com>
Date: Tue, 28 Nov 2000 00:11:09 -0500
From: Richard Scranton <scrantr@ix.netcom.com>
Reply-To: scrantr@ix.netcom.com
Organization: Online Computer Library Center, Inc.
X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 4.1-RELEASE i386)
X-Accept-Language: en-US, en
MIME-Version: 1.0
To: freebsd-java@freebsd.org
Subject: Forte Community Edition v1.0 update 2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org


If you install Sun's JDK1.3 for Linux, you can run the most recent release for Sun's Forte
Community Edition and develop for Java within a reasonably nice GUI.  Here's how...

        Edit the file $JAVA_HOME/jre/lib/font.properties to comment out references to fonts
        containing the strings "symbol" and "adobe-fontspecific" by adding a "#" at the beginning
        of the line.  Don't forget the lines containing "CharToByteSymbol" too.

        If you have installed the OpenJIT just-in-time-compiler, you will need to disable it
        temporarily, as it causes problems for the installer.  Typing "unset JAVA_COMPILER"
        should suffice.  Once the package is installed, it runs normally with the jit enabled.

        Go to Sun's www.javasoft.com web site and find Forte Community Edition.  Download the
        Solaris package.  It is a little over 12 megs.  Install it by typing "sh forte_ce_1_0_2.sh"
        and follow the directions from there.


--
________________________________________________________________________
Technology is dominated by those who manage what they do not understand.
http://www.netcom.com/~scrantr/index.html





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Tue Nov 28  2:21:24 2000
Delivered-To: freebsd-java@freebsd.org
Received: from ntua.gr (achilles.noc.ntua.gr [147.102.222.210])
	by hub.freebsd.org (Postfix) with ESMTP id DCD1537B400
	for <java@FreeBSD.ORG>; Tue, 28 Nov 2000 02:21:20 -0800 (PST)
Received: from netmode.ntua.gr (dolly.netmode.ece.ntua.gr [147.102.13.10])
	by ntua.gr (8.9.3/8.9.3) with ESMTP id MAA20498;
	Tue, 28 Nov 2000 12:21:14 +0200 (EET)
Received: (from past@localhost)
	by netmode.ntua.gr (8.11.1/8.11.1) id eASASGk75280;
	Tue, 28 Nov 2000 12:28:16 +0200 (EET)
	(envelope-from past)
Date: Tue, 28 Nov 2000 12:28:16 +0200
From: Panagiotis Astithas <past@netmode.ntua.gr>
To: Chris BeHanna <behanna@zbzoom.net>
Cc: java@FreeBSD.ORG
Subject: Re: Java et al
Message-ID: <20001128122816.A74372@netmode.ece.ntua.gr>
Reply-To: past@netmode.ntua.gr
References: <Pine.BSF.4.21.0011210301180.90238-100000@snafu.adept.org> <Pine.BSF.4.21.0011261552570.23974-100000@browning.pennasoft.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <Pine.BSF.4.21.0011261552570.23974-100000@browning.pennasoft.com>; from behanna@zbzoom.net on Sun, Nov 26, 2000 at 04:03:26PM -0500
X-Organizational-Unit: Network Management and Optimal Design Laboratory
X-Organization: National Technical University of Athens, GREECE
X-Work-Phone: +30-1-772-1-450
X-Work-FAX: +30-1-772-1-452
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Sun, Nov 26, 2000 at 04:03:26PM -0500, Chris BeHanna wrote:
> the results will not be nearly as dramatic.  For now, IIUC, ShuJIT is
> the hot JIT to use on FreeBSD.

From the various comparisons that I have seen, my understanding is that
OpenJIT is the fastest, as long as you don't mind the increased startup
time.

-past


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Thu Nov 30 15:55:44 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id EE0D037B400
	for <freebsd-java@freebsd.org>; Thu, 30 Nov 2000 15:55:41 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eAUNsoj27122;
	Fri, 1 Dec 2000 00:54:50 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 00:54:50 +0100
From: Ernst de Haan <ernst@jollem.com>
To: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Cc: Yura Cangea <yura@notepad.com>,
	Alex Chudnovsky <chud73@yahoo.com>
Subject: Performance hint for JDK on FreeBSD
Message-ID: <20001201005450.A27077@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Hi,


It seems that the startup of the JVM got a major performance boost when I
changed my font.properties to get rid of the annoying `Font not found'
messages. I went from a startup of ~ 2600 ms to around 500 ms. Does anyone
have similar experiences?

This applies to both the native FreeBSD JDK 1.2.2b10 and to the Sun Linux JDK
1.3.0_01.


Ernst

PS: My system is a P2-400, 256 MB, U2W, XFree86 4.0.1f, GeForce 2 MX.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Thu Nov 30 16: 0:16 2000
Delivered-To: freebsd-java@freebsd.org
Received: from daedalus.cs.brandeis.edu (daedalus.cs.brandeis.edu [129.64.3.179])
	by hub.freebsd.org (Postfix) with ESMTP id 85C0537B402
	for <freebsd-java@FreeBSD.ORG>; Thu, 30 Nov 2000 16:00:13 -0800 (PST)
Received: from localhost (meshko@localhost)
	by daedalus.cs.brandeis.edu (8.9.3/8.9.3) with ESMTP id TAA17261;
	Thu, 30 Nov 2000 19:00:08 -0500
Date: Thu, 30 Nov 2000 19:00:08 -0500 (EST)
From: Mikhail Kruk <meshko@cs.brandeis.edu>
To: Ernst de Haan <ernst@jollem.com>
Cc: FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001201005450.A27077@c187104187.telekabel.chello.nl>
Message-ID: <Pine.LNX.4.30.0011301857330.15358-100000@daedalus.cs.brandeis.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

unfortunately makeing it start up faster does not solve the general
performance issues...
does anyone know if the patches needed to run IBM JDK are going to be
included in some future release? I don't feel like adding unsupported
functionality to the kernel but would really love to use IBM JDK.
Well, any exerpiences of running IBM JDK with those patches are welcome
too. Especially with 1.1.8 version, I find it faster and more reliable.
mk



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Thu Nov 30 16: 1: 1 2000
Delivered-To: freebsd-java@freebsd.org
Received: from www.kpi.com.au (www.kpi.com.au [203.39.132.210])
	by hub.freebsd.org (Postfix) with ESMTP id 6E0C837B402
	for <freebsd-java@FreeBSD.ORG>; Thu, 30 Nov 2000 16:00:57 -0800 (PST)
Received: from grail (www.kpi.com.au [203.39.132.210])
	by www.kpi.com.au (8.9.3/8.9.3) with SMTP id LAA71655;
	Fri, 1 Dec 2000 11:04:56 +1100 (EST)
	(envelope-from shevlandj@kpi.com.au)
From: "Joe Shevland" <shevlandj@kpi.com.au>
To: "Ernst de Haan" <ernst@jollem.com>,
	"FreeBSD Java mailing list" <freebsd-java@FreeBSD.ORG>
Subject: RE: Performance hint for JDK on FreeBSD
Date: Fri, 1 Dec 2000 11:00:26 +1100
Message-ID: <IOEALGALKLLJILALBBOMAENFCFAA.shevlandj@kpi.com.au>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
In-Reply-To: <20001201005450.A27077@c187104187.telekabel.chello.nl>
Importance: Normal
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

I'm not actually seeing these 'Font not found' messages; is this only if =
you're running under X (no X on my box)?

Regards,
Joe

> -----Original Message-----
> From: owner-freebsd-java@FreeBSD.ORG
> [mailto:owner-freebsd-java@FreeBSD.ORG]On Behalf Of Ernst de Haan
> Sent: Friday, 1 December 2000 10:55 AM
> To: FreeBSD Java mailing list
> Cc: Yura Cangea; Alex Chudnovsky
> Subject: Performance hint for JDK on FreeBSD
>=20
>=20
> Hi,
>=20
>=20
> It seems that the startup of the JVM got a major performance boost =
when I
> changed my font.properties to get rid of the annoying `Font not found'
> messages. I went from a startup of ~ 2600 ms to around 500 ms. Does =
anyone
> have similar experiences?
>=20
> This applies to both the native FreeBSD JDK 1.2.2b10 and to the=20
> Sun Linux JDK
> 1.3.0_01.
>=20
>=20
> Ernst
>=20
> PS: My system is a P2-400, 256 MB, U2W, XFree86 4.0.1f, GeForce 2 MX.
>=20
>=20
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message
>=20



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Thu Nov 30 16:27:57 2000
Delivered-To: freebsd-java@freebsd.org
Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66])
	by hub.freebsd.org (Postfix) with ESMTP id 89E7937B400
	for <freebsd-java@FreeBSD.ORG>; Thu, 30 Nov 2000 16:27:54 -0800 (PST)
Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131])
	by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id RAA23675;
	Thu, 30 Nov 2000 17:27:47 -0700 (MST)
	(envelope-from nate@nomad.yogotech.com)
Received: (from nate@localhost)
	by nomad.yogotech.com (8.8.8/8.8.8) id RAA27406;
	Thu, 30 Nov 2000 17:27:46 -0700 (MST)
	(envelope-from nate)
From: Nate Williams <nate@yogotech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14886.61569.423576.956369@nomad.yogotech.com>
Date: Thu, 30 Nov 2000 17:27:45 -0700 (MST)
To: Mikhail Kruk <meshko@cs.brandeis.edu>
Cc: Ernst de Haan <ernst@jollem.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <Pine.LNX.4.30.0011301857330.15358-100000@daedalus.cs.brandeis.edu>
References: <20001201005450.A27077@c187104187.telekabel.chello.nl>
	<Pine.LNX.4.30.0011301857330.15358-100000@daedalus.cs.brandeis.edu>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Reply-To: nate@yogotech.com (Nate Williams)
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> unfortunately makeing it start up faster does not solve the general
> performance issues...
> does anyone know if the patches needed to run IBM JDK are going to be
> included in some future release?

Drew Gallatin merged a number of changes right after 4.2 was released.
I'm not sure if they work on the x86, but I'm running Compaq's Linux-JVM
on the Alpha they donated to the FreeBSD/JDK project, which should help
us 'bootstrap' a native build for FreeBSD.



Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1  3:19:55 2000
Delivered-To: freebsd-java@freebsd.org
Received: from ntua.gr (achilles.noc.ntua.gr [147.102.222.210])
	by hub.freebsd.org (Postfix) with ESMTP id 545ED37B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 03:19:52 -0800 (PST)
Received: from netmode.ntua.gr (dolly.netmode.ece.ntua.gr [147.102.13.10])
	by ntua.gr (8.9.3/8.9.3) with ESMTP id NAA21391;
	Fri, 1 Dec 2000 13:19:50 +0200 (EET)
Received: (from past@localhost)
	by netmode.ntua.gr (8.11.1/8.11.1) id eB1BRAB17490;
	Fri, 1 Dec 2000 13:27:10 +0200 (EET)
	(envelope-from past)
Date: Fri, 1 Dec 2000 13:27:10 +0200
From: Panagiotis Astithas <past@netmode.ntua.gr>
To: Joe Shevland <shevlandj@kpi.com.au>
Cc: Ernst de Haan <ernst@jollem.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201132710.A16854@netmode.ece.ntua.gr>
Reply-To: past@netmode.ntua.gr
References: <20001201005450.A27077@c187104187.telekabel.chello.nl> <IOEALGALKLLJILALBBOMAENFCFAA.shevlandj@kpi.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <IOEALGALKLLJILALBBOMAENFCFAA.shevlandj@kpi.com.au>; from shevlandj@kpi.com.au on Fri, Dec 01, 2000 at 11:00:26AM +1100
X-Organizational-Unit: Network Management and Optimal Design Laboratory
X-Organization: National Technical University of Athens, GREECE
X-Work-Phone: +30-1-772-1-450
X-Work-FAX: +30-1-772-1-452
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Fri, Dec 01, 2000 at 11:00:26AM +1100, Joe Shevland wrote:
> I'm not actually seeing these 'Font not found' messages; is this only if you're running under X (no X on my box)?

Me neither. IIRC Greg fixed those a few versions ago. Or perhaps I 
somehow managed to get those fonts? I have X 4.0.1, URW fonts and a 
few TrueType fonts I came across.

-past


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1  4:12:14 2000
Delivered-To: freebsd-java@freebsd.org
Received: from hermes.research.kpn.com (hermes.research.kpn.com [139.63.192.8])
	by hub.freebsd.org (Postfix) with ESMTP id 94D7137B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 04:12:12 -0800 (PST)
Received: from l04.research.kpn.com (l04.research.kpn.com [139.63.192.204])
 by research.kpn.com (PMDF V5.2-31 #42699)
 with ESMTP id <01JX6W6WJO420012ZJ@research.kpn.com> for
 freebsd-java@FreeBSD.ORG; Fri, 1 Dec 2000 13:12:11 +0100
Received: by l04.research.kpn.com with Internet Mail Service (5.5.2650.21)
	id <XGRLMYK5>; Fri, 01 Dec 2000 13:12:10 +0100
Content-return: allowed
Date: Fri, 01 Dec 2000 13:12:03 +0100
From: "Koster, K.J." <K.J.Koster@kpn.com>
Subject: RE: Performance hint for JDK on FreeBSD
To: FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Message-id: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
MIME-version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-type: text/plain;	charset="iso-8859-1"
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> 
> > I'm not actually seeing these 'Font not found' messages; is 
> this only if you're running under X (no X on my box)?
>
The font errors are Swing-related, so non-Swing applications won't produce
them. (Dunno about AWT).

>
> Me neither. IIRC Greg fixed those a few versions ago. Or perhaps I 
> somehow managed to get those fonts? I have X 4.0.1, URW fonts and a 
> few TrueType fonts I came across.
> 
A fix is described on my web site:
http://www.kjkoster.org/java/index.jsp?page=content/howto.jsp&id=hd06

I never knew that it is a 400% performance boost, which does sound a little
strange. I'm really curious why that is.

    Kees Jan

================================================
 You are only young once,
       but you can stay immature all your life.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1  8:55:15 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id 516E637B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 08:55:12 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1GnNh57601;
	Fri, 1 Dec 2000 17:49:23 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 17:49:23 +0100
From: Ernst de Haan <ernst@jollem.com>
To: "Koster, K.J." <K.J.Koster@kpn.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201174923.A57144@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>; from K.J.Koster@kpn.com on Fri, Dec 01, 2000 at 01:12:03PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Hallo Kees-Jan! ;)

> A fix is described on my web site:
> http://www.kjkoster.org/java/index.jsp?page=content/howto.jsp&id=hd06

Thanks, I used to have the URW fonts installed when I ran XFree86 3.3.x, but
now I'm on 4.0.1f.

Only comment I have is that the fonts seem a little largish, can I compensate
for that somehow?

> I never knew that it is a 400% performance boost, which does sound a little
> strange. I'm really curious why that is.

Well, I turned on profiling, and found that most of the time is spent in X11
specific Java code. I will re-run the tests after I temporarily disabled your
suggested modifications.


Ernst


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1  9:51:24 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id BC9BA37B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 09:51:20 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1HoVG59088;
	Fri, 1 Dec 2000 18:50:31 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 18:50:31 +0100
From: Ernst de Haan <ernst@jollem.com>
To: "Koster, K.J." <K.J.Koster@kpn.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201185031.A58178@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> <20001201174923.A57144@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <20001201174923.A57144@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Fri, Dec 01, 2000 at 05:49:23PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Heya Kees-Jan and all,


> > I never knew that it is a 400% performance boost, which does sound a little
> > strange. I'm really curious why that is.
> 
> Well, I turned on profiling, and found that most of the time is spent in X11
> specific Java code. I will re-run the tests after I temporarily disabled your
> suggested modifications.

Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
10 when I dont have the modified font.properties file:

   CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
   rank   self  accum   count trace method
      1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
      2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
      3 12.93% 53.69%  253952   182 java/lang/String.charAt
      4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
      5  1.44% 57.38%    8258   938 java/lang/String.<init>
      6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
      7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
      8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
      9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
     10  0.91% 62.99%     318   123 java/util/Properties.loadConvert

The traces for the top 3 are:

   TRACE 1304:
      sun/io/CharToByteSingleByte.getNative
      sun/io/CharToByteSingleByte.convert
      sun/awt/font/NativeFontWrapper.registerFonts
      sun/awt/X11GraphicsEnvironment.registerNativeFonts

   TRACE 1399:
      sun/io/CharToByteSingleByte.convert
      sun/awt/font/NativeFontWrapper.registerFonts
      sun/awt/X11GraphicsEnvironment.registerNativeFonts
      sun/java2d/SunGraphicsEnvironment$2.run

   TRACE 182:
      java/lang/String.charAt
      sun/io/CharToByteSingleByte.getNative
      sun/io/CharToByteSingleByte.convert
      sun/awt/font/NativeFontWrapper.registerFonts

Here are the startup times for AWT:

          Original:         w/modifications:
          ----------------  ------------------------------
   run 1: 2607 ms           608 ms
   run 2: 2579 ms           573 ms
   run 3: 2583 ms           601 ms
   run 4: 2713 ms           599 ms

Note: The only modifications performed are adding the URW fonts to my
XF86Config and using the font.properties from Kees-Jan's site instead of the
original one!

Here is the top 10 of CPU time eaters for my application with the
modifications applied:

   CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
   rank   self  accum   count trace method
      1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
      2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
      3  2.25%  7.91%       5   158 java/util/Properties.load
      4  1.98%  9.89%    6356   987 java/lang/String.indexOf
      5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
      6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
      7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
      8  1.42% 16.27%    8590   675 java/lang/String.charAt
      9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
     10  1.36% 19.04%    8133   207 java/lang/String.charAt

Now all of a sudden my application code comes on top. And that's the way I
like it! :)

IMHO these results are quite amazing!

Next thing I'll do is write a small program that will do nothing but starting
AWT and displaying the startup times, as the current results are obtained by
looking at the log output of my own Swing application.


Ernst


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 10: 9:24 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id B42BD37B401
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 10:09:17 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1I8Rn59521;
	Fri, 1 Dec 2000 19:08:27 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 19:08:27 +0100
From: Ernst de Haan <ernst@jollem.com>
To: "Koster, K.J." <K.J.Koster@kpn.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201190827.A59487@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> <20001201174923.A57144@c187104187.telekabel.chello.nl> <20001201185031.A58178@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr"
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <20001201185031.A58178@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Fri, Dec 01, 2000 at 06:50:31PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org


--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Ok, the votes are counted, the results are in :) I've written a small Java
program I wrote to produce new test results that should be reproducable on
other (FreeBSD) systems too. I've included the .java file in an attachment,
and, for your convenience, the AWTTest.class file.

In the program I do 2 things. First I attempt to load the class
java.awt.Toolkit. Then I invoke the class function getDefaultToolkit(), which
apparently initializes AWT.

Here are the results (I did only one run):

                Original   Applied suggested modifications
                --------   -------------------------------
Class load:     155 ms.    154 ms.
AWT startup:    2454 ms.   437 ms.

That's quite a difference, isn't it? :) Could anyone confirm these results for
his/her system?


Ernst


Ernst de Haan wrote:
> Heya Kees-Jan and all,
> 
> 
> > > I never knew that it is a 400% performance boost, which does sound a little
> > > strange. I'm really curious why that is.
> > 
> > Well, I turned on profiling, and found that most of the time is spent in X11
> > specific Java code. I will re-run the tests after I temporarily disabled your
> > suggested modifications.
> 
> Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> 10 when I dont have the modified font.properties file:
> 
>    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
>    rank   self  accum   count trace method
>       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
>       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
>       3 12.93% 53.69%  253952   182 java/lang/String.charAt
>       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
>       5  1.44% 57.38%    8258   938 java/lang/String.<init>
>       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
>       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
>       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
>       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
>      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> 
> The traces for the top 3 are:
> 
>    TRACE 1304:
>       sun/io/CharToByteSingleByte.getNative
>       sun/io/CharToByteSingleByte.convert
>       sun/awt/font/NativeFontWrapper.registerFonts
>       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> 
>    TRACE 1399:
>       sun/io/CharToByteSingleByte.convert
>       sun/awt/font/NativeFontWrapper.registerFonts
>       sun/awt/X11GraphicsEnvironment.registerNativeFonts
>       sun/java2d/SunGraphicsEnvironment$2.run
> 
>    TRACE 182:
>       java/lang/String.charAt
>       sun/io/CharToByteSingleByte.getNative
>       sun/io/CharToByteSingleByte.convert
>       sun/awt/font/NativeFontWrapper.registerFonts
> 
> Here are the startup times for AWT:
> 
>           Original:         w/modifications:
>           ----------------  ------------------------------
>    run 1: 2607 ms           608 ms
>    run 2: 2579 ms           573 ms
>    run 3: 2583 ms           601 ms
>    run 4: 2713 ms           599 ms
> 
> Note: The only modifications performed are adding the URW fonts to my
> XF86Config and using the font.properties from Kees-Jan's site instead of the
> original one!
> 
> Here is the top 10 of CPU time eaters for my application with the
> modifications applied:
> 
>    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
>    rank   self  accum   count trace method
>       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
>       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
>       3  2.25%  7.91%       5   158 java/util/Properties.load
>       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
>       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
>       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
>       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
>       8  1.42% 16.27%    8590   675 java/lang/String.charAt
>       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
>      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> 
> Now all of a sudden my application code comes on top. And that's the way I
> like it! :)
> 
> IMHO these results are quite amazing!
> 
> Next thing I'll do is write a small program that will do nothing but starting
> AWT and displaying the startup times, as the current results are obtained by
> looking at the log output of my own Swing application.
> 
> 
> Ernst
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message
> 

--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="AWTTest.java"

public class AWTTest {

   public static void main(String[] args) throws Exception {

      // Load the Toolkit class from the AWT package
      long beforeClassLoad = System.currentTimeMillis();
      Class c = Class.forName("java.awt.Toolkit");
      long afterClassLoad = System.currentTimeMillis();

      // Get the getDefaultToolkit() class function
      java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);

      // Invoke the class function
      long beforeInvoke = System.currentTimeMillis();
      m.invoke(null, null);
      long afterInvoke = System.currentTimeMillis();

      long t1 = afterClassLoad - beforeClassLoad;
      long t2 = afterInvoke    - beforeInvoke;

      System.out.println("Class load took:  " + t1 + " ms.");
      System.out.println("AWT startup took: " + t2 + " ms.");
      System.exit(0);
   }
}

--PNTmBPCT7hxwcZjr
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="AWTTest.class"
Content-Transfer-Encoding: base64

yv66vgADAC0ATgcAAgEAB0FXVFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAEbWFpbgEA
FihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAApFeGNlcHRpb25zBwAJAQATamF2YS9sYW5nL0V4
Y2VwdGlvbgEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUMAA0ADgEAEWN1cnJlbnRUaW1lTWls
bGlzAQADKClKCgAQAAwHABEBABBqYXZhL2xhbmcvU3lzdGVtCAATAQAQamF2YS5hd3QuVG9v
bGtpdAwAFQAWAQAHZm9yTmFtZQEAJShMamF2YS9sYW5nL1N0cmluZzspTGphdmEvbGFuZy9D
bGFzczsKABgAFAcAGQEAD2phdmEvbGFuZy9DbGFzcwgAGwEAEWdldERlZmF1bHRUb29sa2l0
DAAdAB4BAAlnZXRNZXRob2QBAEAoTGphdmEvbGFuZy9TdHJpbmc7W0xqYXZhL2xhbmcvQ2xh
c3M7KUxqYXZhL2xhbmcvcmVmbGVjdC9NZXRob2Q7CgAYABwMACEAIgEABmludm9rZQEAOShM
amF2YS9sYW5nL09iamVjdDtbTGphdmEvbGFuZy9PYmplY3Q7KUxqYXZhL2xhbmcvT2JqZWN0
OwoAJAAgBwAlAQAYamF2YS9sYW5nL3JlZmxlY3QvTWV0aG9kDAAnACgBAANvdXQBABVMamF2
YS9pby9QcmludFN0cmVhbTsJABAAJgcAKwEAFmphdmEvbGFuZy9TdHJpbmdCdWZmZXIMAC0A
LgEABjxpbml0PgEAAygpVgoAKgAsCAAxAQASQ2xhc3MgbG9hZCB0b29rOiAgDAAzADQBAAZh
cHBlbmQBACwoTGphdmEvbGFuZy9TdHJpbmc7KUxqYXZhL2xhbmcvU3RyaW5nQnVmZmVyOwoA
KgAyDAAzADcBABsoSilMamF2YS9sYW5nL1N0cmluZ0J1ZmZlcjsKACoANggAOgEABCBtcy4M
ADwAPQEACHRvU3RyaW5nAQAUKClMamF2YS9sYW5nL1N0cmluZzsKACoAOwwAQABBAQAHcHJp
bnRsbgEAFShMamF2YS9sYW5nL1N0cmluZzspVgoAQwA/BwBEAQATamF2YS9pby9QcmludFN0
cmVhbQgARgEAEkFXVCBzdGFydHVwIHRvb2s6IAwASABJAQAEZXhpdAEABChJKVYKABAARwoA
AwAsAQAKU291cmNlRmlsZQEADEFXVFRlc3QuamF2YQAhAAEAAwAAAAAAAgAJAAUABgACAAcA
AAAEAAEACAAKAAAAwgAEAA8AAAB6uAAPQBISuAAXTrgADzcELRIaAbYAHzoGuAAPNwcZBgEB
tgAjV7gADzcJFgQfZTcLFgkWB2U3DbIAKbsAKlm3AC8SMLYANRYLtgA4Ejm2ADW2AD62AEKy
ACm7ACpZtwAvEkW2ADUWDbYAOBI5tgA1tgA+tgBCA7gASrEAAAABAAsAAAA2AA0AAAAGAAQA
BwAKAAgADwALABgADgAdAA8AJQAQACoAEgAwABMANwAVAFYAFgB1ABcAeQAYAAEALQAuAAEA
CgAAACEAAQABAAAABSq3AEuxAAAAAQALAAAACgACAAAAAQAEAAEAAQBMAAAAAgBN

--PNTmBPCT7hxwcZjr--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 10:12:22 2000
Delivered-To: freebsd-java@freebsd.org
Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66])
	by hub.freebsd.org (Postfix) with ESMTP id 58B3937B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 10:12:17 -0800 (PST)
Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131])
	by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id LAA11169;
	Fri, 1 Dec 2000 11:12:12 -0700 (MST)
	(envelope-from nate@nomad.yogotech.com)
Received: (from nate@localhost)
	by nomad.yogotech.com (8.8.8/8.8.8) id LAA05856;
	Fri, 1 Dec 2000 11:12:11 -0700 (MST)
	(envelope-from nate)
From: Nate Williams <nate@yogotech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14887.59899.440931.811907@nomad.yogotech.com>
Date: Fri, 1 Dec 2000 11:12:11 -0700 (MST)
To: Ernst de Haan <ernst@jollem.com>
Cc: "Koster, K.J." <K.J.Koster@kpn.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001201190827.A59487@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
	<20001201174923.A57144@c187104187.telekabel.chello.nl>
	<20001201185031.A58178@c187104187.telekabel.chello.nl>
	<20001201190827.A59487@c187104187.telekabel.chello.nl>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Reply-To: nate@yogotech.com (Nate Williams)
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> Ok, the votes are counted, the results are in :) I've written a small Java
> program I wrote to produce new test results that should be reproducable on
> other (FreeBSD) systems too. I've included the .java file in an attachment,
> and, for your convenience, the AWTTest.class file.

For those of us who are absolutely paranoid, can you send the original
.java file?  I *hate* running binaries on my system that I know nothing
about.  (No offense, to Ernst in implying that he's trying to breakin).

Also, having the source allows it to be used for profiling when we do
additional ports and such.

Thanks!


Nate

> Ernst de Haan wrote:
> > Heya Kees-Jan and all,
> > 
> > 
> > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > strange. I'm really curious why that is.
> > > 
> > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > suggested modifications.
> > 
> > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > 10 when I dont have the modified font.properties file:
> > 
> >    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> >    rank   self  accum   count trace method
> >       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> >       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> >       3 12.93% 53.69%  253952   182 java/lang/String.charAt
> >       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> >       5  1.44% 57.38%    8258   938 java/lang/String.<init>
> >       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> >       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> >       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> >       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> >      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > 
> > The traces for the top 3 are:
> > 
> >    TRACE 1304:
> >       sun/io/CharToByteSingleByte.getNative
> >       sun/io/CharToByteSingleByte.convert
> >       sun/awt/font/NativeFontWrapper.registerFonts
> >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > 
> >    TRACE 1399:
> >       sun/io/CharToByteSingleByte.convert
> >       sun/awt/font/NativeFontWrapper.registerFonts
> >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> >       sun/java2d/SunGraphicsEnvironment$2.run
> > 
> >    TRACE 182:
> >       java/lang/String.charAt
> >       sun/io/CharToByteSingleByte.getNative
> >       sun/io/CharToByteSingleByte.convert
> >       sun/awt/font/NativeFontWrapper.registerFonts
> > 
> > Here are the startup times for AWT:
> > 
> >           Original:         w/modifications:
> >           ----------------  ------------------------------
> >    run 1: 2607 ms           608 ms
> >    run 2: 2579 ms           573 ms
> >    run 3: 2583 ms           601 ms
> >    run 4: 2713 ms           599 ms
> > 
> > Note: The only modifications performed are adding the URW fonts to my
> > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > original one!
> > 
> > Here is the top 10 of CPU time eaters for my application with the
> > modifications applied:
> > 
> >    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> >    rank   self  accum   count trace method
> >       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> >       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> >       3  2.25%  7.91%       5   158 java/util/Properties.load
> >       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> >       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> >       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> >       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> >       8  1.42% 16.27%    8590   675 java/lang/String.charAt
> >       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> >      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > 
> > Now all of a sudden my application code comes on top. And that's the way I
> > like it! :)
> > 
> > IMHO these results are quite amazing!
> > 
> > Next thing I'll do is write a small program that will do nothing but starting
> > AWT and displaying the startup times, as the current results are obtained by
> > looking at the log output of my own Swing application.
> > 
> > 
> > Ernst
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-java" in the body of the message
> > 
> public class AWTTest {
> 
>    public static void main(String[] args) throws Exception {
> 
>       // Load the Toolkit class from the AWT package
>       long beforeClassLoad = System.currentTimeMillis();
>       Class c = Class.forName("java.awt.Toolkit");
>       long afterClassLoad = System.currentTimeMillis();
> 
>       // Get the getDefaultToolkit() class function
>       java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> 
>       // Invoke the class function
>       long beforeInvoke = System.currentTimeMillis();
>       m.invoke(null, null);
>       long afterInvoke = System.currentTimeMillis();
> 
>       long t1 = afterClassLoad - beforeClassLoad;
>       long t2 = afterInvoke    - beforeInvoke;
> 
>       System.out.println("Class load took:  " + t1 + " ms.");
>       System.out.println("AWT startup took: " + t2 + " ms.");
>       System.exit(0);
>    }
> }


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 10:24:41 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id 6D2CC37B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 10:24:35 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1INDb59634;
	Fri, 1 Dec 2000 19:23:13 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 19:23:13 +0100
From: Ernst de Haan <ernst@jollem.com>
To: Nate Williams <nate@yogotech.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201192313.A59625@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> <20001201174923.A57144@c187104187.telekabel.chello.nl> <20001201185031.A58178@c187104187.telekabel.chello.nl> <20001201190827.A59487@c187104187.telekabel.chello.nl> <14887.59899.440931.811907@nomad.yogotech.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <14887.59899.440931.811907@nomad.yogotech.com>; from nate@yogotech.com on Fri, Dec 01, 2000 at 11:12:11AM -0700
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Look twice, it's there :)

Nate Williams wrote:
> > Ok, the votes are counted, the results are in :) I've written a small Java
> > program I wrote to produce new test results that should be reproducable on
> > other (FreeBSD) systems too. I've included the .java file in an attachment,
> > and, for your convenience, the AWTTest.class file.
> 
> For those of us who are absolutely paranoid, can you send the original
> .java file?  I *hate* running binaries on my system that I know nothing
> about.  (No offense, to Ernst in implying that he's trying to breakin).
> 
> Also, having the source allows it to be used for profiling when we do
> additional ports and such.
> 
> Thanks!
> 
> 
> Nate
> 
> > Ernst de Haan wrote:
> > > Heya Kees-Jan and all,
> > > 
> > > 
> > > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > > strange. I'm really curious why that is.
> > > > 
> > > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > > suggested modifications.
> > > 
> > > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > > 10 when I dont have the modified font.properties file:
> > > 
> > >    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > >    rank   self  accum   count trace method
> > >       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > >       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > >       3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > >       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > >       5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > >       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > >       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > >       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > >       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > >      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > > 
> > > The traces for the top 3 are:
> > > 
> > >    TRACE 1304:
> > >       sun/io/CharToByteSingleByte.getNative
> > >       sun/io/CharToByteSingleByte.convert
> > >       sun/awt/font/NativeFontWrapper.registerFonts
> > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > 
> > >    TRACE 1399:
> > >       sun/io/CharToByteSingleByte.convert
> > >       sun/awt/font/NativeFontWrapper.registerFonts
> > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > >       sun/java2d/SunGraphicsEnvironment$2.run
> > > 
> > >    TRACE 182:
> > >       java/lang/String.charAt
> > >       sun/io/CharToByteSingleByte.getNative
> > >       sun/io/CharToByteSingleByte.convert
> > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > 
> > > Here are the startup times for AWT:
> > > 
> > >           Original:         w/modifications:
> > >           ----------------  ------------------------------
> > >    run 1: 2607 ms           608 ms
> > >    run 2: 2579 ms           573 ms
> > >    run 3: 2583 ms           601 ms
> > >    run 4: 2713 ms           599 ms
> > > 
> > > Note: The only modifications performed are adding the URW fonts to my
> > > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > > original one!
> > > 
> > > Here is the top 10 of CPU time eaters for my application with the
> > > modifications applied:
> > > 
> > >    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > >    rank   self  accum   count trace method
> > >       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > >       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > >       3  2.25%  7.91%       5   158 java/util/Properties.load
> > >       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > >       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > >       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > >       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > >       8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > >       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > >      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > > 
> > > Now all of a sudden my application code comes on top. And that's the way I
> > > like it! :)
> > > 
> > > IMHO these results are quite amazing!
> > > 
> > > Next thing I'll do is write a small program that will do nothing but starting
> > > AWT and displaying the startup times, as the current results are obtained by
> > > looking at the log output of my own Swing application.
> > > 
> > > 
> > > Ernst
> > > 
> > > 
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-java" in the body of the message
> > > 
> > public class AWTTest {
> > 
> >    public static void main(String[] args) throws Exception {
> > 
> >       // Load the Toolkit class from the AWT package
> >       long beforeClassLoad = System.currentTimeMillis();
> >       Class c = Class.forName("java.awt.Toolkit");
> >       long afterClassLoad = System.currentTimeMillis();
> > 
> >       // Get the getDefaultToolkit() class function
> >       java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> > 
> >       // Invoke the class function
> >       long beforeInvoke = System.currentTimeMillis();
> >       m.invoke(null, null);
> >       long afterInvoke = System.currentTimeMillis();
> > 
> >       long t1 = afterClassLoad - beforeClassLoad;
> >       long t2 = afterInvoke    - beforeInvoke;
> > 
> >       System.out.println("Class load took:  " + t1 + " ms.");
> >       System.out.println("AWT startup took: " + t2 + " ms.");
> >       System.exit(0);
> >    }
> > }
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 12: 6: 2 2000
Delivered-To: freebsd-java@freebsd.org
Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66])
	by hub.freebsd.org (Postfix) with ESMTP id BF94837B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 12:05:56 -0800 (PST)
Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131])
	by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id NAA13024;
	Fri, 1 Dec 2000 13:05:49 -0700 (MST)
	(envelope-from nate@nomad.yogotech.com)
Received: (from nate@localhost)
	by nomad.yogotech.com (8.8.8/8.8.8) id NAA06505;
	Fri, 1 Dec 2000 13:05:48 -0700 (MST)
	(envelope-from nate)
From: Nate Williams <nate@yogotech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14888.1179.861868.150322@nomad.yogotech.com>
Date: Fri, 1 Dec 2000 13:05:47 -0700 (MST)
To: Ernst de Haan <ernst@jollem.com>
Cc: "Koster, K.J." <K.J.Koster@kpn.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001201190827.A59487@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
	<20001201174923.A57144@c187104187.telekabel.chello.nl>
	<20001201185031.A58178@c187104187.telekabel.chello.nl>
	<20001201190827.A59487@c187104187.telekabel.chello.nl>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Reply-To: nate@yogotech.com (Nate Williams)
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> Ok, the votes are counted, the results are in :) I've written a small Java
> program I wrote to produce new test results that should be reproducable on
> other (FreeBSD) systems too. I've included the .java file in an attachment,
> and, for your convenience, the AWTTest.class file.
> 

Question:  Are you running this program on your 'local' client (with the
DISPLAY environment variable set to :0)?  If not, the AWT startup will
be greatly effected, since AWT startup does some X stuff behind the
scenes, which may take longer if it involves network traffic.

> In the program I do 2 things. First I attempt to load the class
> java.awt.Toolkit. Then I invoke the class function getDefaultToolkit(), which
> apparently initializes AWT.
> 
> Here are the results (I did only one run):
> 
>                 Original   Applied suggested modifications
>                 --------   -------------------------------
> Class load:     155 ms.    154 ms.
> AWT startup:    2454 ms.   437 ms.
> 
> That's quite a difference, isn't it? :) Could anyone confirm these
> results for his/her system?

Running JDK1.1.8 on my box I get:
nomad:~/roof/dpr/src/dpr % java AWTTest
Class load took:  8 ms.
AWT startup took: 24 ms.

Pretty darn quickly, but it's a fairly speedy box.  I won't post the
Alpha numbers because I'm doing all the X stuff remotely.


Nate

> Ernst de Haan wrote:
> > Heya Kees-Jan and all,
> > 
> > 
> > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > strange. I'm really curious why that is.
> > > 
> > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > suggested modifications.
> > 
> > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > 10 when I dont have the modified font.properties file:
> > 
> >    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> >    rank   self  accum   count trace method
> >       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> >       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> >       3 12.93% 53.69%  253952   182 java/lang/String.charAt
> >       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> >       5  1.44% 57.38%    8258   938 java/lang/String.<init>
> >       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> >       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> >       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> >       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> >      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > 
> > The traces for the top 3 are:
> > 
> >    TRACE 1304:
> >       sun/io/CharToByteSingleByte.getNative
> >       sun/io/CharToByteSingleByte.convert
> >       sun/awt/font/NativeFontWrapper.registerFonts
> >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > 
> >    TRACE 1399:
> >       sun/io/CharToByteSingleByte.convert
> >       sun/awt/font/NativeFontWrapper.registerFonts
> >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> >       sun/java2d/SunGraphicsEnvironment$2.run
> > 
> >    TRACE 182:
> >       java/lang/String.charAt
> >       sun/io/CharToByteSingleByte.getNative
> >       sun/io/CharToByteSingleByte.convert
> >       sun/awt/font/NativeFontWrapper.registerFonts
> > 
> > Here are the startup times for AWT:
> > 
> >           Original:         w/modifications:
> >           ----------------  ------------------------------
> >    run 1: 2607 ms           608 ms
> >    run 2: 2579 ms           573 ms
> >    run 3: 2583 ms           601 ms
> >    run 4: 2713 ms           599 ms
> > 
> > Note: The only modifications performed are adding the URW fonts to my
> > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > original one!
> > 
> > Here is the top 10 of CPU time eaters for my application with the
> > modifications applied:
> > 
> >    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> >    rank   self  accum   count trace method
> >       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> >       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> >       3  2.25%  7.91%       5   158 java/util/Properties.load
> >       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> >       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> >       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> >       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> >       8  1.42% 16.27%    8590   675 java/lang/String.charAt
> >       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> >      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > 
> > Now all of a sudden my application code comes on top. And that's the way I
> > like it! :)
> > 
> > IMHO these results are quite amazing!
> > 
> > Next thing I'll do is write a small program that will do nothing but starting
> > AWT and displaying the startup times, as the current results are obtained by
> > looking at the log output of my own Swing application.
> > 
> > 
> > Ernst
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-java" in the body of the message
> > 
> public class AWTTest {
> 
>    public static void main(String[] args) throws Exception {
> 
>       // Load the Toolkit class from the AWT package
>       long beforeClassLoad = System.currentTimeMillis();
>       Class c = Class.forName("java.awt.Toolkit");
>       long afterClassLoad = System.currentTimeMillis();
> 
>       // Get the getDefaultToolkit() class function
>       java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> 
>       // Invoke the class function
>       long beforeInvoke = System.currentTimeMillis();
>       m.invoke(null, null);
>       long afterInvoke = System.currentTimeMillis();
> 
>       long t1 = afterClassLoad - beforeClassLoad;
>       long t2 = afterInvoke    - beforeInvoke;
> 
>       System.out.println("Class load took:  " + t1 + " ms.");
>       System.out.println("AWT startup took: " + t2 + " ms.");
>       System.exit(0);
>    }
> }


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 16: 8: 0 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id D688637B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 16:07:51 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB206xa61307;
	Sat, 2 Dec 2000 01:06:59 +0100 (CET)
	(envelope-from ernst)
Date: Sat, 2 Dec 2000 01:06:59 +0100
From: Ernst de Haan <ernst@jollem.com>
To: Nate Williams <nate@yogotech.com>
Cc: FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001202010659.A61295@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> <20001201174923.A57144@c187104187.telekabel.chello.nl> <20001201185031.A58178@c187104187.telekabel.chello.nl> <20001201190827.A59487@c187104187.telekabel.chello.nl> <14888.1179.861868.150322@nomad.yogotech.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <14888.1179.861868.150322@nomad.yogotech.com>; from nate@yogotech.com on Fri, Dec 01, 2000 at 01:05:47PM -0700
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Hi Nate,

Yes, I'm doing the tests locally on a P2-400 system, recent FreeBSD 4.2-S, 256
MB internal, XFree86 4.0.1f, FreeBSD JDK 1.2.2b10, no JIT.

Those numbers for JDK 1.1 are pretty nifty! Wow, I should test that too! Your
JDK 1.1 port seems very resource-effective!

Ernst


Nate Williams wrote:
> > Ok, the votes are counted, the results are in :) I've written a small Java
> > program I wrote to produce new test results that should be reproducable on
> > other (FreeBSD) systems too. I've included the .java file in an attachment,
> > and, for your convenience, the AWTTest.class file.
> > 
> 
> Question:  Are you running this program on your 'local' client (with the
> DISPLAY environment variable set to :0)?  If not, the AWT startup will
> be greatly effected, since AWT startup does some X stuff behind the
> scenes, which may take longer if it involves network traffic.
> 
> > In the program I do 2 things. First I attempt to load the class
> > java.awt.Toolkit. Then I invoke the class function getDefaultToolkit(), which
> > apparently initializes AWT.
> > 
> > Here are the results (I did only one run):
> > 
> >                 Original   Applied suggested modifications
> >                 --------   -------------------------------
> > Class load:     155 ms.    154 ms.
> > AWT startup:    2454 ms.   437 ms.
> > 
> > That's quite a difference, isn't it? :) Could anyone confirm these
> > results for his/her system?
> 
> Running JDK1.1.8 on my box I get:
> nomad:~/roof/dpr/src/dpr % java AWTTest
> Class load took:  8 ms.
> AWT startup took: 24 ms.
> 
> Pretty darn quickly, but it's a fairly speedy box.  I won't post the
> Alpha numbers because I'm doing all the X stuff remotely.
> 
> 
> Nate
> 
> > Ernst de Haan wrote:
> > > Heya Kees-Jan and all,
> > > 
> > > 
> > > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > > strange. I'm really curious why that is.
> > > > 
> > > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > > suggested modifications.
> > > 
> > > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > > 10 when I dont have the modified font.properties file:
> > > 
> > >    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > >    rank   self  accum   count trace method
> > >       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > >       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > >       3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > >       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > >       5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > >       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > >       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > >       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > >       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > >      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > > 
> > > The traces for the top 3 are:
> > > 
> > >    TRACE 1304:
> > >       sun/io/CharToByteSingleByte.getNative
> > >       sun/io/CharToByteSingleByte.convert
> > >       sun/awt/font/NativeFontWrapper.registerFonts
> > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > 
> > >    TRACE 1399:
> > >       sun/io/CharToByteSingleByte.convert
> > >       sun/awt/font/NativeFontWrapper.registerFonts
> > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > >       sun/java2d/SunGraphicsEnvironment$2.run
> > > 
> > >    TRACE 182:
> > >       java/lang/String.charAt
> > >       sun/io/CharToByteSingleByte.getNative
> > >       sun/io/CharToByteSingleByte.convert
> > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > 
> > > Here are the startup times for AWT:
> > > 
> > >           Original:         w/modifications:
> > >           ----------------  ------------------------------
> > >    run 1: 2607 ms           608 ms
> > >    run 2: 2579 ms           573 ms
> > >    run 3: 2583 ms           601 ms
> > >    run 4: 2713 ms           599 ms
> > > 
> > > Note: The only modifications performed are adding the URW fonts to my
> > > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > > original one!
> > > 
> > > Here is the top 10 of CPU time eaters for my application with the
> > > modifications applied:
> > > 
> > >    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > >    rank   self  accum   count trace method
> > >       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > >       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > >       3  2.25%  7.91%       5   158 java/util/Properties.load
> > >       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > >       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > >       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > >       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > >       8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > >       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > >      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > > 
> > > Now all of a sudden my application code comes on top. And that's the way I
> > > like it! :)
> > > 
> > > IMHO these results are quite amazing!
> > > 
> > > Next thing I'll do is write a small program that will do nothing but starting
> > > AWT and displaying the startup times, as the current results are obtained by
> > > looking at the log output of my own Swing application.
> > > 
> > > 
> > > Ernst
> > > 
> > > 
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-java" in the body of the message
> > > 
> > public class AWTTest {
> > 
> >    public static void main(String[] args) throws Exception {
> > 
> >       // Load the Toolkit class from the AWT package
> >       long beforeClassLoad = System.currentTimeMillis();
> >       Class c = Class.forName("java.awt.Toolkit");
> >       long afterClassLoad = System.currentTimeMillis();
> > 
> >       // Get the getDefaultToolkit() class function
> >       java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> > 
> >       // Invoke the class function
> >       long beforeInvoke = System.currentTimeMillis();
> >       m.invoke(null, null);
> >       long afterInvoke = System.currentTimeMillis();
> > 
> >       long t1 = afterClassLoad - beforeClassLoad;
> >       long t2 = afterInvoke    - beforeInvoke;
> > 
> >       System.out.println("Class load took:  " + t1 + " ms.");
> >       System.out.println("AWT startup took: " + t2 + " ms.");
> >       System.exit(0);
> >    }
> > }
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 16:37:52 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id DAF5737B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 16:37:45 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB20asj62987;
	Sat, 2 Dec 2000 01:36:54 +0100 (CET)
	(envelope-from ernst)
Date: Sat, 2 Dec 2000 01:36:54 +0100
From: Ernst de Haan <ernst@jollem.com>
To: Nate Williams <nate@yogotech.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001202013654.A61526@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> <20001201174923.A57144@c187104187.telekabel.chello.nl> <20001201185031.A58178@c187104187.telekabel.chello.nl> <20001201190827.A59487@c187104187.telekabel.chello.nl> <14887.59899.440931.811907@nomad.yogotech.com> <20001201192313.A59625@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <20001201192313.A59625@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Fri, Dec 01, 2000 at 07:23:13PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Ok, I tested the JDK 1.1.8 with the AWTTest utility, and I wrote a new program
to see if the creation of a java.awt.Frame would perhaps take a longer amount
of time on 1.1.8. Not. It seems JDK 1.1.8 just perhaps heaps better than
1.2.2...

I tested with a number of JDK's, all on my P2-400, 256 MB, 16 bit-color (!),
XFree86 4.0.1f:

   * JDK 1.1.8/FreeBSD
   * JDK 1.2.2b9/FreeBSD
   * JDK 1.2.2b10/FreeBSD
   * JDK 1.3.0_01/Linux (Sun)
   * JDK 1.2.2rc4/Linux (Blackdown)

Here's three tables with run results, the column headers contain the run #.

   Class load                     1      2      3      4
   ---------------------------+------+------+------+------+
   1.1.8/FreeBSD              |   46 |   47 |   45 |   46 |
   1.2.2b9/FreeBSD            |  142 |  142 |  142 |  142 |
   1.2.2b10/FreeBSD           |  167 |  167 |  168 |  168 |
   1.3.0_01/Linux (Sun)       |  443 |  437 |  437 |  438 |
   1.2.2rc4/Linux (Blackdown) |  315 |  313 |  315 |  314 |

   AWT startup                    1      2      3      4
   ---------------------------+------+------+------+------+
   1.1.8/FreeBSD              |   44 |   44 |   43 |   42 |
   1.2.2b9/FreeBSD            |  444 |  444 |  445 |  455 |
   1.2.2b10/FreeBSD           |  437 |  438 |  444 |  451 |
   1.3.0_01/Linux (Sun)       |  415 |  415 |  413 |  414 |
   1.2.2rc4/Linux (Blackdown) | 1064 | 1070 | 1067 | 1063 |

   Frame create                   1      2      3      4
   ---------------------------+------+------+------+------+
   1.1.8/FreeBSD              |   17 |   19 |   17 |   18 |
   1.2.2b9/FreeBSD            |   13 |   13 |   14 |   14 |
   1.2.2b10/FreeBSD           |   11 |   11 |   12 |   12 |
   1.3.0_01/Linux (Sun)       |   12 |   12 |   12 |   12 |
   1.2.2rc4/Linux (Blackdown) |   11 |   11 |   11 |   11 |

What surprises me most is that the native 1.1.8 was so fast. And I wonder why
the native 1.2.2b10 is just a bit slower than the older b9.

Ernst


Ernst de Haan wrote:
> Look twice, it's there :)
> 
> Nate Williams wrote:
> > > Ok, the votes are counted, the results are in :) I've written a small Java
> > > program I wrote to produce new test results that should be reproducable on
> > > other (FreeBSD) systems too. I've included the .java file in an attachment,
> > > and, for your convenience, the AWTTest.class file.
> > 
> > For those of us who are absolutely paranoid, can you send the original
> > .java file?  I *hate* running binaries on my system that I know nothing
> > about.  (No offense, to Ernst in implying that he's trying to breakin).
> > 
> > Also, having the source allows it to be used for profiling when we do
> > additional ports and such.
> > 
> > Thanks!
> > 
> > 
> > Nate
> > 
> > > Ernst de Haan wrote:
> > > > Heya Kees-Jan and all,
> > > > 
> > > > 
> > > > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > > > strange. I'm really curious why that is.
> > > > > 
> > > > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > > > suggested modifications.
> > > > 
> > > > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > > > 10 when I dont have the modified font.properties file:
> > > > 
> > > >    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > > >    rank   self  accum   count trace method
> > > >       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > > >       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > > >       3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > > >       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > > >       5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > > >       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > > >       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > > >       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > > >       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > > >      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > > > 
> > > > The traces for the top 3 are:
> > > > 
> > > >    TRACE 1304:
> > > >       sun/io/CharToByteSingleByte.getNative
> > > >       sun/io/CharToByteSingleByte.convert
> > > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > > 
> > > >    TRACE 1399:
> > > >       sun/io/CharToByteSingleByte.convert
> > > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > >       sun/java2d/SunGraphicsEnvironment$2.run
> > > > 
> > > >    TRACE 182:
> > > >       java/lang/String.charAt
> > > >       sun/io/CharToByteSingleByte.getNative
> > > >       sun/io/CharToByteSingleByte.convert
> > > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > > 
> > > > Here are the startup times for AWT:
> > > > 
> > > >           Original:         w/modifications:
> > > >           ----------------  ------------------------------
> > > >    run 1: 2607 ms           608 ms
> > > >    run 2: 2579 ms           573 ms
> > > >    run 3: 2583 ms           601 ms
> > > >    run 4: 2713 ms           599 ms
> > > > 
> > > > Note: The only modifications performed are adding the URW fonts to my
> > > > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > > > original one!
> > > > 
> > > > Here is the top 10 of CPU time eaters for my application with the
> > > > modifications applied:
> > > > 
> > > >    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > > >    rank   self  accum   count trace method
> > > >       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > > >       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > > >       3  2.25%  7.91%       5   158 java/util/Properties.load
> > > >       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > > >       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > > >       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > > >       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > > >       8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > > >       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > > >      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > > > 
> > > > Now all of a sudden my application code comes on top. And that's the way I
> > > > like it! :)
> > > > 
> > > > IMHO these results are quite amazing!
> > > > 
> > > > Next thing I'll do is write a small program that will do nothing but starting
> > > > AWT and displaying the startup times, as the current results are obtained by
> > > > looking at the log output of my own Swing application.
> > > > 
> > > > 
> > > > Ernst
> > > > 
> > > > 
> > > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > > with "unsubscribe freebsd-java" in the body of the message
> > > > 
> > > public class AWTTest {
> > > 
> > >    public static void main(String[] args) throws Exception {
> > > 
> > >       // Load the Toolkit class from the AWT package
> > >       long beforeClassLoad = System.currentTimeMillis();
> > >       Class c = Class.forName("java.awt.Toolkit");
> > >       long afterClassLoad = System.currentTimeMillis();
> > > 
> > >       // Get the getDefaultToolkit() class function
> > >       java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> > > 
> > >       // Invoke the class function
> > >       long beforeInvoke = System.currentTimeMillis();
> > >       m.invoke(null, null);
> > >       long afterInvoke = System.currentTimeMillis();
> > > 
> > >       long t1 = afterClassLoad - beforeClassLoad;
> > >       long t2 = afterInvoke    - beforeInvoke;
> > > 
> > >       System.out.println("Class load took:  " + t1 + " ms.");
> > >       System.out.println("AWT startup took: " + t2 + " ms.");
> > >       System.exit(0);
> > >    }
> > > }
> > 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 16:47:10 2000
Delivered-To: freebsd-java@freebsd.org
Received: from daedalus.cs.brandeis.edu (daedalus.cs.brandeis.edu [129.64.3.179])
	by hub.freebsd.org (Postfix) with ESMTP id 2705B37B401
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 16:47:08 -0800 (PST)
Received: from localhost (meshko@localhost)
	by daedalus.cs.brandeis.edu (8.9.3/8.9.3) with ESMTP id TAA23384;
	Fri, 1 Dec 2000 19:46:54 -0500
Date: Fri, 1 Dec 2000 19:46:54 -0500 (EST)
From: Mikhail Kruk <meshko@cs.brandeis.edu>
To: Ernst de Haan <ernst@jollem.com>
Cc: Nate Williams <nate@yogotech.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001202013654.A61526@c187104187.telekabel.chello.nl>
Message-ID: <Pine.LNX.4.30.0012011942130.23343-100000@daedalus.cs.brandeis.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> Ok, I tested the JDK 1.1.8 with the AWTTest utility, and I wrote a new program
> to see if the creation of a java.awt.Frame would perhaps take a longer amount
> of time on 1.1.8. Not. It seems JDK 1.1.8 just perhaps heaps better than
> 1.2.2...

isn't it just known fact that 1.2 is all times worst in term of
performance? Using Windows as a references system (since I don't have
access to a single Sun machine), I've noticed that 1.1 is the fastest, 1.3
is acceptable and 1.2 is ... well, I try not to use it.
I agree that native FreeBSD port of 1.1.8 show very decent performance.
Even on an "averagely high" PIII-500 AWT functions show very-very good
performance.
So what I'm getting at is: do we need a 1.2 port or is it better to
concentrate on 1.3?
I might be missing something important of course...



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Fri Dec  1 17:32:30 2000
Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id CD00C37B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 17:32:20 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB21VSm64559;
	Sat, 2 Dec 2000 02:31:28 +0100 (CET)
	(envelope-from ernst)
Date: Sat, 2 Dec 2000 02:31:28 +0100
From: Ernst de Haan <ernst@jollem.com>
To: Nate Williams <nate@yogotech.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001202023128.A62998@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> <20001201174923.A57144@c187104187.telekabel.chello.nl> <20001201185031.A58178@c187104187.telekabel.chello.nl> <20001201190827.A59487@c187104187.telekabel.chello.nl> <14887.59899.440931.811907@nomad.yogotech.com> <20001201192313.A59625@c187104187.telekabel.chello.nl> <20001202013654.A61526@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="IJpNTDwzlM2Ie8A6"
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <20001202013654.A61526@c187104187.telekabel.chello.nl>; from ernst@jollem.com on Sat, Dec 02, 2000 at 01:36:54AM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org


--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Oops, I didn't include the new AWTTest.java file :) Here it is. And I included
a compiled version too.

Ernst


Ernst de Haan wrote:
> Ok, I tested the JDK 1.1.8 with the AWTTest utility, and I wrote a new program
> to see if the creation of a java.awt.Frame would perhaps take a longer amount
> of time on 1.1.8. Not. It seems JDK 1.1.8 just perhaps heaps better than
> 1.2.2...
> 
> I tested with a number of JDK's, all on my P2-400, 256 MB, 16 bit-color (!),
> XFree86 4.0.1f:
> 
>    * JDK 1.1.8/FreeBSD
>    * JDK 1.2.2b9/FreeBSD
>    * JDK 1.2.2b10/FreeBSD
>    * JDK 1.3.0_01/Linux (Sun)
>    * JDK 1.2.2rc4/Linux (Blackdown)
> 
> Here's three tables with run results, the column headers contain the run #.
> 
>    Class load                     1      2      3      4
>    ---------------------------+------+------+------+------+
>    1.1.8/FreeBSD              |   46 |   47 |   45 |   46 |
>    1.2.2b9/FreeBSD            |  142 |  142 |  142 |  142 |
>    1.2.2b10/FreeBSD           |  167 |  167 |  168 |  168 |
>    1.3.0_01/Linux (Sun)       |  443 |  437 |  437 |  438 |
>    1.2.2rc4/Linux (Blackdown) |  315 |  313 |  315 |  314 |
> 
>    AWT startup                    1      2      3      4
>    ---------------------------+------+------+------+------+
>    1.1.8/FreeBSD              |   44 |   44 |   43 |   42 |
>    1.2.2b9/FreeBSD            |  444 |  444 |  445 |  455 |
>    1.2.2b10/FreeBSD           |  437 |  438 |  444 |  451 |
>    1.3.0_01/Linux (Sun)       |  415 |  415 |  413 |  414 |
>    1.2.2rc4/Linux (Blackdown) | 1064 | 1070 | 1067 | 1063 |
> 
>    Frame create                   1      2      3      4
>    ---------------------------+------+------+------+------+
>    1.1.8/FreeBSD              |   17 |   19 |   17 |   18 |
>    1.2.2b9/FreeBSD            |   13 |   13 |   14 |   14 |
>    1.2.2b10/FreeBSD           |   11 |   11 |   12 |   12 |
>    1.3.0_01/Linux (Sun)       |   12 |   12 |   12 |   12 |
>    1.2.2rc4/Linux (Blackdown) |   11 |   11 |   11 |   11 |
> 
> What surprises me most is that the native 1.1.8 was so fast. And I wonder why
> the native 1.2.2b10 is just a bit slower than the older b9.
> 
> Ernst
> 
> 
> Ernst de Haan wrote:
> > Look twice, it's there :)
> > 
> > Nate Williams wrote:
> > > > Ok, the votes are counted, the results are in :) I've written a small Java
> > > > program I wrote to produce new test results that should be reproducable on
> > > > other (FreeBSD) systems too. I've included the .java file in an attachment,
> > > > and, for your convenience, the AWTTest.class file.
> > > 
> > > For those of us who are absolutely paranoid, can you send the original
> > > .java file?  I *hate* running binaries on my system that I know nothing
> > > about.  (No offense, to Ernst in implying that he's trying to breakin).
> > > 
> > > Also, having the source allows it to be used for profiling when we do
> > > additional ports and such.
> > > 
> > > Thanks!
> > > 
> > > 
> > > Nate
> > > 
> > > > Ernst de Haan wrote:
> > > > > Heya Kees-Jan and all,
> > > > > 
> > > > > 
> > > > > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > > > > strange. I'm really curious why that is.
> > > > > > 
> > > > > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > > > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > > > > suggested modifications.
> > > > > 
> > > > > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > > > > 10 when I dont have the modified font.properties file:
> > > > > 
> > > > >    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > > > >    rank   self  accum   count trace method
> > > > >       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > > > >       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > > > >       3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > > > >       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > > > >       5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > > > >       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > > > >       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > > > >       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > > > >       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > > > >      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > > > > 
> > > > > The traces for the top 3 are:
> > > > > 
> > > > >    TRACE 1304:
> > > > >       sun/io/CharToByteSingleByte.getNative
> > > > >       sun/io/CharToByteSingleByte.convert
> > > > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > > > 
> > > > >    TRACE 1399:
> > > > >       sun/io/CharToByteSingleByte.convert
> > > > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > > >       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > > >       sun/java2d/SunGraphicsEnvironment$2.run
> > > > > 
> > > > >    TRACE 182:
> > > > >       java/lang/String.charAt
> > > > >       sun/io/CharToByteSingleByte.getNative
> > > > >       sun/io/CharToByteSingleByte.convert
> > > > >       sun/awt/font/NativeFontWrapper.registerFonts
> > > > > 
> > > > > Here are the startup times for AWT:
> > > > > 
> > > > >           Original:         w/modifications:
> > > > >           ----------------  ------------------------------
> > > > >    run 1: 2607 ms           608 ms
> > > > >    run 2: 2579 ms           573 ms
> > > > >    run 3: 2583 ms           601 ms
> > > > >    run 4: 2713 ms           599 ms
> > > > > 
> > > > > Note: The only modifications performed are adding the URW fonts to my
> > > > > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > > > > original one!
> > > > > 
> > > > > Here is the top 10 of CPU time eaters for my application with the
> > > > > modifications applied:
> > > > > 
> > > > >    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > > > >    rank   self  accum   count trace method
> > > > >       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > > > >       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > > > >       3  2.25%  7.91%       5   158 java/util/Properties.load
> > > > >       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > > > >       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > > > >       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > > > >       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > > > >       8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > > > >       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > > > >      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > > > > 
> > > > > Now all of a sudden my application code comes on top. And that's the way I
> > > > > like it! :)
> > > > > 
> > > > > IMHO these results are quite amazing!
> > > > > 
> > > > > Next thing I'll do is write a small program that will do nothing but starting
> > > > > AWT and displaying the startup times, as the current results are obtained by
> > > > > looking at the log output of my own Swing application.
> > > > > 
> > > > > 
> > > > > Ernst
> > > > > 
> > > > > 
> > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > > > with "unsubscribe freebsd-java" in the body of the message
> > > > > 
> > > > public class AWTTest {
> > > > 
> > > >    public static void main(String[] args) throws Exception {
> > > > 
> > > >       // Load the Toolkit class from the AWT package
> > > >       long beforeClassLoad = System.currentTimeMillis();
> > > >       Class c = Class.forName("java.awt.Toolkit");
> > > >       long afterClassLoad = System.currentTimeMillis();
> > > > 
> > > >       // Get the getDefaultToolkit() class function
> > > >       java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> > > > 
> > > >       // Invoke the class function
> > > >       long beforeInvoke = System.currentTimeMillis();
> > > >       m.invoke(null, null);
> > > >       long afterInvoke = System.currentTimeMillis();
> > > > 
> > > >       long t1 = afterClassLoad - beforeClassLoad;
> > > >       long t2 = afterInvoke    - beforeInvoke;
> > > > 
> > > >       System.out.println("Class load took:  " + t1 + " ms.");
> > > >       System.out.println("AWT startup took: " + t2 + " ms.");
> > > >       System.exit(0);
> > > >    }
> > > > }
> > > 
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-java" in the body of the message
> > 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message
> 

--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="AWTTest.java"

public class AWTTest {

   public static void main(String[] args) throws Exception {

      // Load the Toolkit and Frame classes from the AWT package
      long beforeClassLoad = System.currentTimeMillis();
      Class c1 = Class.forName("java.awt.Toolkit");
      Class c2 = Class.forName("java.awt.Frame");
      long afterClassLoad = System.currentTimeMillis();

      // Get the getDefaultToolkit() class function
      java.lang.reflect.Method m1      = c1.getMethod("getDefaultToolkit", null);
      java.lang.reflect.Constructor m2 = c2.getConstructor(null);

      // Invoke the getDefaultToolkit() class function
      long beforeInvoke = System.currentTimeMillis();
      m1.invoke(null, null);
      long afterInvoke = System.currentTimeMillis();

      // Create a frame
      long beforeFrameCreate = System.currentTimeMillis();
      m2.newInstance(null);
      long afterFrameCreate = System.currentTimeMillis();

      long t1 = afterClassLoad   - beforeClassLoad;
      long t2 = afterInvoke      - beforeInvoke;
      long t3 = afterFrameCreate - beforeFrameCreate;

      System.out.println("Class load took:   " + t1 + " ms.");
      System.out.println("AWT startup took:  " + t2 + " ms.");
      System.out.println("Frame create took: " + t3 + " ms.");
      System.exit(0);
   }
}

--IJpNTDwzlM2Ie8A6
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="AWTTest.class"
Content-Transfer-Encoding: base64

yv66vgADAC0AZwcAAgEAB0FXVFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAEbWFpbgEA
FihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAApFeGNlcHRpb25zBwAJAQATamF2YS9sYW5nL0V4
Y2VwdGlvbgEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUMAA0ADgEAEWN1cnJlbnRUaW1lTWls
bGlzAQADKClKCgAQAAwHABEBABBqYXZhL2xhbmcvU3lzdGVtCAATAQAQamF2YS5hd3QuVG9v
bGtpdAwAFQAWAQAHZm9yTmFtZQEAJShMamF2YS9sYW5nL1N0cmluZzspTGphdmEvbGFuZy9D
bGFzczsKABgAFAcAGQEAD2phdmEvbGFuZy9DbGFzcwgAGwEADmphdmEuYXd0LkZyYW1lCAAd
AQARZ2V0RGVmYXVsdFRvb2xraXQMAB8AIAEACWdldE1ldGhvZAEAQChMamF2YS9sYW5nL1N0
cmluZztbTGphdmEvbGFuZy9DbGFzczspTGphdmEvbGFuZy9yZWZsZWN0L01ldGhvZDsKABgA
HgwAIwAkAQAOZ2V0Q29uc3RydWN0b3IBADMoW0xqYXZhL2xhbmcvQ2xhc3M7KUxqYXZhL2xh
bmcvcmVmbGVjdC9Db25zdHJ1Y3RvcjsKABgAIgwAJwAoAQAGaW52b2tlAQA5KExqYXZhL2xh
bmcvT2JqZWN0O1tMamF2YS9sYW5nL09iamVjdDspTGphdmEvbGFuZy9PYmplY3Q7CgAqACYH
ACsBABhqYXZhL2xhbmcvcmVmbGVjdC9NZXRob2QMAC0ALgEAC25ld0luc3RhbmNlAQAnKFtM
amF2YS9sYW5nL09iamVjdDspTGphdmEvbGFuZy9PYmplY3Q7CgAwACwHADEBAB1qYXZhL2xh
bmcvcmVmbGVjdC9Db25zdHJ1Y3RvcgwAMwA0AQADb3V0AQAVTGphdmEvaW8vUHJpbnRTdHJl
YW07CQAQADIHADcBABZqYXZhL2xhbmcvU3RyaW5nQnVmZmVyDAA5ADoBAAY8aW5pdD4BAAMo
KVYKADYAOAgAPQEAE0NsYXNzIGxvYWQgdG9vazogICAMAD8AQAEABmFwcGVuZAEALChMamF2
YS9sYW5nL1N0cmluZzspTGphdmEvbGFuZy9TdHJpbmdCdWZmZXI7CgA2AD4MAD8AQwEAGyhK
KUxqYXZhL2xhbmcvU3RyaW5nQnVmZmVyOwoANgBCCABGAQAEIG1zLgwASABJAQAIdG9TdHJp
bmcBABQoKUxqYXZhL2xhbmcvU3RyaW5nOwoANgBHDABMAE0BAAdwcmludGxuAQAVKExqYXZh
L2xhbmcvU3RyaW5nOylWCgBPAEsHAFABABNqYXZhL2lvL1ByaW50U3RyZWFtCABSAQATQVdU
IHN0YXJ0dXAgdG9vazogIAgAVAEAE0ZyYW1lIGNyZWF0ZSB0b29rOiAMAEwAOgoATwBVDABY
AFkBAAFyAQAWKFtJKUxqYXZhL2xhbmcvU3RyaW5nOwoAAQBXDABcAF0BAARleGl0AQAEKEkp
VgoAEABbDAA5AF0KADYAXwwAPwBiAQAbKEMpTGphdmEvbGFuZy9TdHJpbmdCdWZmZXI7CgA2
AGEKAAMAOAEAClNvdXJjZUZpbGUBAAxBV1RUZXN0LmphdmEAIQABAAMAAAAAAAMACQAFAAYA
AgAHAAAABAABAAgACgAAA44ABAAZAAADFrgAD0ASErgAF04SGrgAFzoEuAAPNwUtEhwBtgAh
OgcZBAG2ACU6CLgADzcJGQcBAbYAKVe4AA83C7gADzcNGQgBtgAvV7gADzcPFgUfZTcRFgsW
CWU3ExYPFg1lNxWyADW7ADZZtwA7Ejy2AEEWEbYARBJFtgBBtgBKtgBOsgA1uwA2WbcAOxJR
tgBBFhO2AEQSRbYAQbYASrYATrIANbsANlm3ADsSU7YAQRYVtgBEEkW2AEG2AEq2AE6yADW2
AFYQLLwKWQMQTE9ZBBBiT1kFEGhPWQYQE09ZBxBUT1kIEGVPWRAGEFhPWRAHEBNPWRAIEGFP
WRAJEGJPWRAKEGdPWRALEBNPWRAMEGlPWRANEFhPWRAOEGVPWRAPEGxPWRAQEBNPWRAREGZP
WRASEFhPWRATEFZPWRAUEGhPWRAVEGVPWRAWEFxPWRAXEGdPWRAYEGxPWRAZECBPWRAaEFZP
WRAbEGJPWRAcEGFPWRAdEGZPWRAeEFxPWRAfEGJPWRAgEGhPWRAhEGZPWRAiEB9PWRAjEBNP
WRAkEFRPWRAlEGVPWRAmEFhPWRAnEBNPWRAoEGxPWRApEGJPWRAqEGhPWRArEDJPOhcQM7wK
WQMQR09ZBBBbT1kFEFxPWQYQZk9ZBxATT1kIEGNPWRAGEGVPWRAHEGJPWRAIEFpPWRAJEGVP
WRAKEFRPWRALEGBPWRAMEBNPWRANEFZPWRAOEGJPWRAPEGhPWRAQEF9PWRAREFdPWRASEBNP
WRATEFtPWRAUEFRPWRAVEGlPWRAWEFhPWRAXEBNPWRAYEFhPWRAZEGVPWRAaEFRPWRAbEGZP
WRAcEFhPWRAdEFdPWRAeEBNPWRAfEGxPWRAgEGJPWRAhEGhPWRAiEGVPWRAjEBNPWRAkEFtP
WRAlEGJPWRAmEGBPWRAnEFhPWRAoEBNPWRApEFdPWRAqEFxPWRArEGVPWRAsEFhPWRAtEFZP
WRAuEGdPWRAvEGJPWRAwEGVPWRAxEGxPWRAyEBRPOhiyADUZF7gAWrYATrIANRkYuABatgBO
A7gAXrEAAAABAAsAAABmABkAAAAGAAQABwAKAAgAEQAJABYADAAfAA0AJwAQACwAEQA0ABIA
OQAVAD4AFgBFABcASgAZAFAAGgBXABsAXgAdAH0AHgCcAB8AuwAgAMEAIgHJACMC+wAkAwYA
JQMRACcDFQAoAAoAWABZAAEACgAAAGYAAwAFAAAALiq+PLsANlkbtwBgTQM+pwAWKh0uEA1g
kjYELBUEtgBjV4QDAR0bof/rLLYASrAAAAABAAsAAAAmAAkAAAArAAMALAAMAC0ADAAtABEA
LgAaAC8AIQAtACQALQApADEAAQA5ADoAAQAKAAAAIQABAAEAAAAFKrcAZLEAAAABAAsAAAAK
AAIAAAABAAQAAQABAGUAAAACAGY=

--IJpNTDwzlM2Ie8A6--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


From owner-freebsd-java  Sat Dec  2  3:39:30 2000
Delivered-To: freebsd-java@freebsd.org
Received: from cafe.muraoka.info.waseda.ac.jp (cafe.muraoka.info.waseda.ac.jp [133.9.68.49])
	by hub.freebsd.org (Postfix) with ESMTP id 7C8F537B400
	for <freebsd-java@FreeBSD.ORG>; Sat,  2 Dec 2000 03:39:27 -0800 (PST)
Received: from muraoka.info.waseda.ac.jp (shudoh@localhost [127.0.0.1])
	by cafe.muraoka.info.waseda.ac.jp (8.9.1a/3.7W) with ESMTP id UAA32417;
	Sat, 2 Dec 2000 20:37:59 +0900
Message-Id: <200012021137.UAA32417@cafe.muraoka.info.waseda.ac.jp>
To: Mikhail Kruk <meshko@cs.brandeis.edu>
Cc: freebsd-java@FreeBSD.ORG
Subject: Re: Performance hint for JDK on FreeBSD
In-reply-to: Your message of "Fri, 01 Dec 2000 19:46:54 EST."
	<Pine.LNX.4.30.0012011942130.23343-100000@daedalus.cs.brandeis.edu>
Date: Sat, 02 Dec 2000 20:37:59 +0900
From: SHUDO Kazuyuki <shudoh@muraoka.info.waseda.ac.jp>
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Mikhail Kruk wrote:

> isn't it just known fact that 1.2 is all times worst in term of
> performance? Using Windows as a references system (since I don't have
> access to a single Sun machine), I've noticed that 1.1 is the fastest, 1.3
> is acceptable and 1.2 is ... well, I try not to use it.

A certain amount of functions that were written in C in 1.1
were rewritten in Java for 1.2.
This is one of reasons why 1.2 is slower than 1.1.
JVM of 1.2.2 loads over 150 classes when it starts up,
even though 1.1.8 loads about 50 classes.
This means that plenty of method invocations happen.

> So what I'm getting at is: do we need a 1.2 port or is it better to
> concentrate on 1.3?

1.3 loads more classes. But selective compilation technique and
other improvements made start-up time acceptable.

Kazuyuki SHUDO				Happy Hacking!
  Muraoka Lab., Grad. School of Sci. & Eng., Waseda Univ.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message