Javavmwrapper is slow?
Ronald Klop
ronald-freebsd8 at klop.yi.org
Mon Nov 22 23:37:54 GMT 2004
On Fri, 19 Nov 2004 01:27:14 +0100, Herve Quiroz
<herve.quiroz at esil.univ-mrs.fr> 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 at 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
More information about the freebsd-java
mailing list