*
The moose likes Performance and the fly likes JDK1.3 vs JDK1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "JDK1.3 vs JDK1.4" Watch "JDK1.3 vs JDK1.4" New topic
Author

JDK1.3 vs JDK1.4

Andy Dejung
Greenhorn

Joined: Sep 05, 2002
Posts: 20
Hello Together
I migrated a application from JDK1.3 to JDK1.4. The importprocess runs under JDK1.3 three minutes long. After the migration the process runs 20 minutes.
Has anyone an Idea what I do wrong?
Here a brief description what I'm doing in the importprocess:
I parse with sax a large XML-File (30MB) and store it partly in to a mysql DB. After that I transform the XML and write it out to a other XML-File.
Can anyone help me to find out why it takes so much longer?
Andy
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Did you already try to use a profiler to find the bottleneck?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Andy Dejung
Greenhorn

Joined: Sep 05, 2002
Posts: 20
No not jet.
Could you recommend one?
I working with eclipse, is there a plugin?
Thanks
Andy
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Andy Dejung:
No not jet.
Could you recommend one?
I working with eclipse, is there a plugin?
Thanks
Andy

There is a plugin for integrating JProfiler. Seems to work fine for me.
Andy Dejung
Greenhorn

Joined: Sep 05, 2002
Posts: 20
As you have recommended I used the JProfiler to find out where I lose the time. And surprising it is not in the java core classes but in the classes of the packages org.xml.sax and org.apache.xml.serialize and other apachen packages.
Some method calls take about 10 times as long as the had with Java 1.3
I have no clue why it is so as I only changed the JDK.
Any idea?
Thanks for help
Andy
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Those classes are part of JRE1.4, but not of 1.3 afair. Perhaps you are therefore using different versions of those libraries, depending on the JDK?
Andy Dejung
Greenhorn

Joined: Sep 05, 2002
Posts: 20
You are right I deploy the xalan.jar but it uses the classes from the jdk1.4. I'm using the j2sdk1.4.1_01 but I could not find out which version of xalan it is included.
How can I switch that the xalan.jar is used and not the jdk classes?
Thank you again you help me a lot.
Andy
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Andy Dejung:
How can I switch that the xalan.jar is used and not the jdk classes?

Sorry, I don't know...
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Andy,
Place the xalan.jar, xercesImpl.jar, and xml-apis.jar in the <java-home>\lib\endorsed directory, where <java-home> is where the runtime software is installed.
Or use the -Xbootclasspath java commandline option to prepend the new xalan.jar, xercesImpl.jar, and xml-apis.jar to the boot class path.
Regards
Andy Dejung
Greenhorn

Joined: Sep 05, 2002
Posts: 20
Thanks you two Ilja Preuss and Beno�t d'Oncieu with your help I could solve the problem. After moving the three jars to the /lib/endorsed directory the program runs quick again.

Again thanks a lot for your help
Andy
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
 
 
subject: JDK1.3 vs JDK1.4
 
Similar Threads
how to set path for JDK1.4 in solaris
Tomcat Class Loader Prefeence
javabeans
Solaris JDK1.4 path setting
Enhancements in JDK 1.3