× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike wrote:
> ...when the java class is instanced, the java program is
> created on the iSeries.  It is created using the command defaults for the
> CRTJVAPGM command.

Actually, the behavior you see at "first touch" depends on several factors
-- most notably 1) the release of the operating system, and 2) whether the
classes are loaded with a user class loader.

Classes loaded by a "user class loader" -- ubiquitous in application
servers -- only present themselves to the JVM as arrays of byte.  So, since
the RISC instruction stream is attached to the file in the IFS, we can't
get at it even if it is there.  This "surprise" provided significant
impetus for us to obtain/implement a top-notch JIT, which we did.

So, if your "first run" class is in a class loaded by a user class loader
(pretty safe bet if it's running in a application server), and you are on
an "older" release (V4R4 or earlier, IIRC?), then you are seeing the
expense of a "first touch" CRTJVAPGM every time the application starts up.
The only circumvention is to get a more current release, since the JIT was
not "back-ported" to earlier releases.

On the other hand, if you're on V4R5 or V5R1, then my theory is all wet
(unless you are WAY back-level on PTFs).

HTH.

-blair

Blair Wyman -- iSeries JVM -- (507) 253-2891
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I was born not knowing, and have had only a
little time to change that here and there."   -- Richard P. Feynman




                    "Mike Silvers"
                    <msilvers@hbs-inc.       To:     <java400-l@midrange.com>
                    com>                     cc:
                    Sent by:                 Subject:     Re: sluggish java 
program
                    java400-l-admin@mi
                    drange.com


                    11/15/2001 12:10
                    PM
                    Please respond to
                    java400-l





You are correct..... when the java class is instanced, the java program is
created on the iSeries.  It is created using the command defaults for the
CRTJVAPGM command.  If you did not change these defaults, the optimization
level is at 10.  I believe that this causes the iSeries java program to be
compiled at different times (I'm not sure what the criteria is for
compiling).  If you compile the jar file at optimization level 40, the java
program will only recompile when the class file is changed.  There is a
give
and take for the different optimization levels.  At level 40 there is
almost
no debugging supported.  At level 10 all debugging is supported.

Mike


----- Original Message -----
From: "Urbanek, Marty" <Marty_Urbanek@stercomm.com>
To: <java400-l@midrange.com>
Sent: Thursday, November 15, 2001 12:55 PM
Subject: Re: sluggish java program


> I thought that once the class has been implicity compiled and a java
program
> object created, that it should not have to be compiled again via
CRTJVAPGM.
> Therefor the slowness should only occur once.
>
> I have a java program that behaves similarly. I subscribe to the slow
class
> loading theory. If possible, perhaps you could run your server
interactively
> and start your JVM with the -V option so it will display the classes as
they
> are loaded. This was very enlightening for me. It is amazing how many
> classes it has to load. It takes significant time, at least on my
program.
I
> am seeking a way to "pre-load" all this stuff so it will be ready when a
> real request comes in.
>
> -Marty
>
> -------- original message -------------
>
>
> One thing about using jar files... to enhance performance, compile the
jar
> files before they are used (CRTJVAPGM).  I always submit these compile
jobs
> to batch because it is a big job.  If you do not compile these before
using
> them, the classes will be compiled the first time they are instanced.
This
> might be what is happening....
>
> Mike
>
> ----- Original Message -----
> From: <AAnuszewski@hammer.net>
> To: <java400-l@midrange.com>
> Sent: Thursday, November 15, 2001 12:06 PM
> Subject: Re: sluggish java program
>
>
> >
> >
> >
> > No.  It is a simple tcp/ip socket server.  It does use the jt400.jar to
> manage
> > connections with a data area and some data queues.
> >
> > Amy
> _______________________________________________
> This is the Java Programming on and around the iSeries / AS400
(JAVA400-L)
mailing list
> To post a message email: JAVA400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
> or email: JAVA400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.
>
>


_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.