Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2004 01:27:14 +0100
From:      Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To:        Ronald Klop <ronald-freebsd8@klop.yi.org>
Cc:        freebsd-java@freebsd.org
Subject:   Re: Javavmwrapper is slow?
Message-ID:  <20041119002714.GA91497@arabica.esil.univ-mrs.fr>
In-Reply-To: <opshokzkqp8527sy@smtp.local>
References:  <opshokzkqp8527sy@smtp.local>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041119002714.GA91497>