Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Standalone Java Very Slow when called from PB9.0.2

8 posts in EJB Client Last posting was on 2006-05-11 11:55:34.0Z
Tomm Posted on 2006-05-08 12:38:55.0Z
Sender: 6450.445f3ad5.1804289383@sybase.com
From: TomM
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Standalone Java Very Slow when called from PB9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <445f3bd8.6459.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 8 May 2006 05:38:48 -0700, 10.22.241.42
Lines: 44
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 8 May 2006 05:38:49 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 8 May 2006 05:38:55 -0700
X-Trace: forums-1-dub 1147091935 10.22.108.75 (8 May 2006 05:38:55 -0700)
X-Original-Trace: 8 May 2006 05:38:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:643
Article PK: 424764

After encountering slow performance in a PB 9.0.2 app
calling a
standalone Java class installed locally on the cllient
machine, I
developed a simple test to compare Java running directly
from the command line vs. Java being executed from a simple
PowerBuilder app. My test class simply loops through adding
doubles (see
code below). When executed from the command prompt the
looping finished in about 1 second. When executed via a call
from PB, the same call takes 8 to 9 seconds to complete. In
both cases the delivered PowerBuilder jvm was used. To
create the test in PowerBuilder we essentially followed the
example from the "Calling a Java Class from PowerBuilder 10"
white paper from Sybase making the Java class look like an
EJB (also had a PS_SpeedTestHome class).

Has anyone else experienced similar slowness between native
Java
execution and invoking Java via PowerBuilder? Are their any
tricks to
improve JVM performance? I did experiment with specifying
-Xms and -Xmx values, but those changes did not
significantly affect the performance.

public class PS_SpeedTest {

PS_SpeedTest() {
}

/**
* Method to help diagnose speed problem in PBNI
interface to
* PS Pooling classes.
* This method takes from .5s to 1s run standalone.
*/
public static double SpeedTest() {

double dSum = 0.0;
for (double d = 0; d < 1E8; d++) {
dSum += d;
}
return dSum;
}


Bede <bede_nosp Posted on 2006-05-08 13:13:05.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Standalone Java Very Slow when called from PB9.0.2
Message-ID: <MPG.1ec9624c24f5b6de9897b6@forums.sybase.com>
References: <445f3bd8.6459.1681692777@sybase.com>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 8 May 2006 06:13:05 -0700
X-Trace: forums-1-dub 1147093985 194.7.38.226 (8 May 2006 06:13:05 -0700)
X-Original-Trace: 8 May 2006 06:13:05 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:644
Article PK: 424763

turn off debug mode for the JVM ?


In article <445f3bd8.6459.1681692777@sybase.com>, TomM says...

> After encountering slow performance in a PB 9.0.2 app
> calling a
> standalone Java class installed locally on the cllient
> machine, I
> developed a simple test to compare Java running directly
> from the command line vs. Java being executed from a simple
> PowerBuilder app. My test class simply loops through adding
> doubles (see
> code below). When executed from the command prompt the
> looping finished in about 1 second. When executed via a call
> from PB, the same call takes 8 to 9 seconds to complete. In
> both cases the delivered PowerBuilder jvm was used. To
> create the test in PowerBuilder we essentially followed the
> example from the "Calling a Java Class from PowerBuilder 10"
> white paper from Sybase making the Java class look like an
> EJB (also had a PS_SpeedTestHome class).
>
> Has anyone else experienced similar slowness between native
> Java
> execution and invoking Java via PowerBuilder? Are their any
> tricks to
> improve JVM performance? I did experiment with specifying
> -Xms and -Xmx values, but those changes did not
> significantly affect the performance.
>
> public class PS_SpeedTest {
>
> PS_SpeedTest() {
> }
>
> /**
> * Method to help diagnose speed problem in PBNI
> interface to
> * PS Pooling classes.
> * This method takes from .5s to 1s run standalone.
> */
> public static double SpeedTest() {
>
> double dSum = 0.0;
> for (double d = 0; d < 1E8; d++) {
> dSum += d;
> }
> return dSum;
> }
>


Li-xiang.Sun Posted on 2006-05-10 02:50:48.0Z
From: Li-xiang.Sun@sybase.com
Subject: Re: Standalone Java Very Slow when called from PB9.0.2
Newsgroups: sybase.public.powerbuilder.ejbclient
MIME-Version: 1.0
References: <MPG.1ec9624c24f5b6de9897b6@forums.sybase.com> <4460aac6.1797.1681692777@sybase.com>
X-Newsreader: Lotus Notes Release 6.5 September 26, 2003
X-MIMETrack: Serialize by Notes Client on Li-xiang Sun/SYBASE(Release 6.5|September 26, 2003) at 05/10/2006 10:50:33 AM, Serialize complete at 05/10/2006 10:50:33 AM
Content-Type: multipart/alternative; boundary="=_alternative 000F9D7D4825716A_="
NNTP-Posting-Host: li-xiangsun.sybase.com
X-Original-NNTP-Posting-Host: li-xiangsun.sybase.com
Message-ID: <44615508@forums-1-dub>
Date: 9 May 2006 19:50:48 -0700
X-Trace: forums-1-dub 1147229448 10.42.14.211 (9 May 2006 19:50:48 -0700)
X-Original-Trace: 9 May 2006 19:50:48 -0700, li-xiangsun.sybase.com
Lines: 12
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:647
Article PK: 424765


change second parameter of createJavaVM to false to disable debug.


Bede <bede_nosp Posted on 2006-05-10 08:27:21.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Standalone Java Very Slow when called from PB9.0.2
Message-ID: <MPG.1ecbc247e89ce4fe9897b9@forums.sybase.com>
References: <MPG.1ec9624c24f5b6de9897b6@forums.sybase.com> <4460aac6.1797.1681692777@sybase.com>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 10 May 2006 01:27:21 -0700
X-Trace: forums-1-dub 1147249641 194.7.38.226 (10 May 2006 01:27:21 -0700)
X-Original-Trace: 10 May 2006 01:27:21 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:652
Article PK: 424775

that would result in things not being logged to VM.OUT, but the JVM
would still run in debug mode (with huge influence on performance)

In PB, where you instantiate the JVM, you need to call as such:

JavaVM l_jvm

// ...
j_jvm.createJavaVM(ls_classpath, False)


from the PB help: JavaVM.createJavaVM(string classpath, boolean isdebug)

Good luck,

Ben


have In article <4460aac6.1797.1681692777@sybase.com>, TomM says...

> What constitues "turning off debug mode"? My registry entry
> for
> HKEY_LOCAL_MACHINE\SOFTWARE\sybase\powerbuilder\9.0\Java\PBRTConfig\PBJVMConfig
> had an entry for 0 as "-verbose:jni,class". I removed this
> entry and set the Count to "0". Is this turning off debug
> mode?
>
> > turn off debug mode for the JVM ?
> >
> >
>


Tomm Posted on 2006-05-10 20:57:17.0Z
Sender: 2d1f.446239d4.1804289383@sybase.com
From: TomM
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Standalone Java Very Slow when called from PB9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <446253ad.2e1f.1681692777@sybase.com>
References: <445f3bd8.6459.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 May 2006 13:57:17 -0700
X-Trace: forums-1-dub 1147294637 10.22.241.41 (10 May 2006 13:57:17 -0700)
X-Original-Trace: 10 May 2006 13:57:17 -0700, 10.22.241.41
Lines: 7
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:654
Article PK: 424771

I eliminated the slow down by removing the
java.compiler=NONE entry from the PBJVMProps registry entry.
After removing the entry the Java under PowerBuilder
processing time matched the command line Java processing
time.
Thanks for the explanations of debugging. I hadn't realized
I ever had it turned on.


Bede <bede_nosp Posted on 2006-05-11 11:55:34.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.ejbclient
Subject: Re: Standalone Java Very Slow when called from PB9.0.2
Message-ID: <MPG.1ecd44487a91600c9897be@forums.sybase.com>
References: <445f3bd8.6459.1681692777@sybase.com> <446253ad.2e1f.1681692777@sybase.com>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 11 May 2006 04:55:34 -0700
X-Trace: forums-1-dub 1147348534 194.7.38.226 (11 May 2006 04:55:34 -0700)
X-Original-Trace: 11 May 2006 04:55:34 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.ejbclient:655
Article PK: 424773

probably because i've only assigned a JRE to PB (and not a JDK), this
java.compiler=NONE settings has no effect on my runs.

Cheers,


In article <446253ad.2e1f.1681692777@sybase.com>, TomM says...

> I eliminated the slow down by removing the
> java.compiler=NONE entry from the PBJVMProps registry entry.
> After removing the entry the Java under PowerBuilder
> processing time matched the command line Java processing
> time.
> Thanks for the explanations of debugging. I hadn't realized
> I ever had it turned on.
>