Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

program that calls a sax parser to convert xml documents

  Asked By: Loretta    Date: Aug 16    Category: Java    Views: 1070
  

I am working on a program that calls a sax parser to convert xml
documents. This is being developed using a Websphere IDE. I am
developing on a pc, but the progam will be ran in unix. I am an
experienced programmer, but new to java. I noticed that the program
seemed to be taking an inordinate amount of time to run. So I found a
way to see which methods are taking the most cpu time. Figuring that
maybe I had some poorly structured code that was eating cpu time.
But what I found was that java.lang.Object.wait was chewing up 66% of
the cpu time. I used a -X parameter when I ran the program to get
this information.

Looking at the documentation shows that wait is invoked until a
notification is received from a thread that it has completed it's
task. So I am not sure how to optimize this to cut down on the
wait. It appears to be working on a "createDocumentScanner" the step
before it goes into a wait. Is there some way to determine if the
thread that is causing this problem is waiting on system resources,
or is allocating memory or whatever?


CPU TIME (ms) BEGIN (total = 135524) Wed Aug 6 09:09:37 2003
rank self accum count trace method
1 33.93% 33.93% 6 2776 java.lang.Object.wait
2 33.93% 67.87% 4 2780 java.lang.Object.wait

<<< cut and paste of trace >>>

TRACE 25:
org.apache.xerces.util.XMLAttributesImpl.<init>
(XMLAttributesImpl.java:120)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.<init>
(XMLDocumentFragmentScannerImpl.java:277)
org.apache.xerces.impl.XMLDocumentScannerImpl.<init>
(XMLDocumentScannerImpl.java:237)

org.apache.xerces.parsers.StandardParserConfiguration.createDocumentSc
anner(StandardParserConfiguration.java:829)
TRACE 2776:
java.lang.Object.wait(Object.java:Unknown line)
java.lang.Object.wait(Object.java:Unknown line)
TRACE 2575:
java.net.URL.<init>(URL.java:Unknown line)
sun.misc.URLClassPath$FileLoader.getResource
(URLClassPath.java:Unknown line)
sun.misc.URLClassPath.getResource(URLClassPath.java:Unknown line)
java.net.URLClassLoader$1.run(URLClassLoader.java:Unknown line)

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on program that calls a sax parser to convert xml documents Or get search suggestion and latest updates.




Tagged: