From owner-freebsd-java@FreeBSD.ORG Fri Nov 19 00:27:22 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 B545216A4CE for ; Fri, 19 Nov 2004 00:27:22 +0000 (GMT) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78C6943D39 for ; Fri, 19 Nov 2004 00:27:21 +0000 (GMT) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost.esil.univ-mrs.fr [127.0.0.1])iAJ0RK7i091571; Fri, 19 Nov 2004 01:27:20 +0100 (CET) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: (from rv@localhost) by arabica.esil.univ-mrs.fr (8.13.1/8.13.1/Submit) id iAJ0REDf091570; Fri, 19 Nov 2004 01:27:14 +0100 (CET) (envelope-from herve.quiroz@esil.univ-mrs.fr) X-Authentication-Warning: arabica.esil.univ-mrs.fr: rv set sender to herve.quiroz@esil.univ-mrs.fr using -f Date: Fri, 19 Nov 2004 01:27:14 +0100 From: Herve Quiroz To: Ronald Klop Message-ID: <20041119002714.GA91497@arabica.esil.univ-mrs.fr> Mail-Followup-To: Ronald Klop , freebsd-java@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i 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: Fri, 19 Nov 2004 00:27:22 -0000 Ronald, On Thu, Nov 18, 2004 at 11:05:34PM +0100, Ronald Klop wrote: > And call it like this. > time ./jvmtest.sh /usr/local/jdk1.4.2/bin/java > real 0m7.847s > user 0m6.085s > sys 0m1.055s > > And like this. > time ./jvmtest.sh /usr/local/bin/java > real 0m45.763s > user 0m19.226s > sys 0m22.745s At home, I have: time ./jvmtest.sh /usr/local/jdk1.4.2/bin/java real 0m1.535s user 0m1.144s sys 0m0.220s time ./javatest.sh /usr/local/bin/java real 0m1.632s user 0m1.224s sys 0m0.209s Not much of a difference on my system: FreeBSD 5.3-STABLE #1: Tue Nov 16 19:54:30 CET 2004 CPU: Intel(R) Pentium(R) 4 CPU 2.00GHz (1998.19-MHz 686-class CPU) real memory = 536805376 (511 MB) 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