From owner-freebsd-java@FreeBSD.ORG Mon Nov 22 23:37:53 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5FA216A4CE for ; Mon, 22 Nov 2004 23:37:53 +0000 (GMT) Received: from smtp18.wxs.nl (smtp18.wxs.nl [195.121.6.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7206843D31 for ; Mon, 22 Nov 2004 23:37:53 +0000 (GMT) (envelope-from ronald-freebsd8@klop.yi.org) Received: from ronald.echteman.nl (ip51cdc5d2.speed.planet.nl [81.205.197.210])2004))freebsd-java@freebsd.org; Tue, 23 Nov 2004 00:37:52 +0100 (CET) Received: (qmail 27300 invoked from network); Mon, 22 Nov 2004 23:37:50 +0000 Received: from unknown (HELO laptop.thuis.klop.ws) (192.168.1.4) by ronald.echteman.nl with SMTP; Mon, 22 Nov 2004 23:37:50 +0000 Received: (qmail 38783 invoked from network); Mon, 22 Nov 2004 21:03:47 +0000 Received: from softdnserror (HELO smtp.local) (127.0.0.1) by softdnserror with SMTP; Mon, 22 Nov 2004 21:03:47 +0000 Date: Mon, 22 Nov 2004 22:03:42 +0100 From: Ronald Klop In-reply-to: <20041119002714.GA91497@arabica.esil.univ-mrs.fr> To: Herve Quiroz Message-id: MIME-version: 1.0 Content-type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 Content-transfer-encoding: 7BIT User-Agent: Opera M2/7.54 (FreeBSD, build 751) References: <20041119002714.GA91497@arabica.esil.univ-mrs.fr> cc: freebsd-java@freebsd.org Subject: Re: Javavmwrapper is slow? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 23:37:54 -0000 On Fri, 19 Nov 2004 01:27:14 +0100, Herve Quiroz wrote: > Ronald, > > On Thu, Nov 18, 2004 at 11:05:34PM +0100, Ronald Klop wrote: [ cut some lines with stats ] > However, it would be nice to see if yours being slow is due to some > side-effect from javavmwrapper with a particular configuration. > >> Do I forget something? Or is javavm not very fast? >> Wouldn't it be nice to have javavm create symlinks to the right >> executables without runtime checking etc/javavms every time? > > The main idea here is to be able to dynamically select a suitable JVM > according to the JDK version, vendor, and OS that are (possibly) > required and specified via environement variables. This forbids the use > of symlinks to the executables of one single JDK. > > If you need this kind of feature, I think it is even more efficient to > add $JAVA_HOME/bin in front of $PATH... BTW, using the same logic as > within the current javavm script, maybe we could provide a script that > some user could "source" to add the required JDK's $JAVA_HOME/bin in > front of $PATH. Or maybe just something to echo this $JAVA_HOME > according to the same JAVA_VERSION, JAVA_OS and JAVA_VENDOR variables. > OTOH, I would personally prefer to see people use the current flavour of > javavmwrapper, unless of course we can't find a fix for the performance > loss you speak of. > > Herve If I comment out these lines calling javavm is just a bit slower than calling java directly. (0.9 secs vs. 1.0 secs.) I understand that this removes a lot functionality from the script, but it indicates where the performance goes. # Determine location of bsd.port.mk if it exists #PORTSDIR= #if [ -r /usr/share/mk/bsd.port.mk ]; then # PORTSDIR=`"${MAKE}" -f /usr/share/mk/bsd.port.mk -V PORTSDIR 2>/dev/null` #fi # #BSD_PORT_MK= #if [ ! -z "${PORTSDIR}" -a -r "${PORTSDIR}/Mk/bsd.port.mk" ]; then # BSD_PORT_MK="${PORTSDIR}/Mk/bsd.port.mk" #fi I don't know if I reported what my system is. It is a bit slower than yours. :-) FreeBSD laptop 5.3-STABLE FreeBSD 5.3-STABLE #59: Tue Nov 16 23:49:18 CET 2004 root@guido.thuis.klop.ws:/usr/obj/usr/src/sys/LAPTOP i386 CPU: Pentium II/Pentium II Xeon/Celeron (266.68-MHz 686-class CPU) real memory = 100622336 (95 MB) avail memory = 92979200 (88 MB) cat /usr/local/etc/javavms /usr/local/jdk1.4.2/bin/java # FREEBSD-JDK1.4.2 Ronald. -- Ronald Klop, Amsterdam, The Netherlands