|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML Parser in Servlet Performance Problem
Hi, I'm experiencing a serious performance problem when parsing XML from a ServletInputStream in my doPost() handling. My input data is in the form of a very shallow xml document which looks like: <TermList> <Identifier>list33</Identifier> <Term>dogfood</Term> <!-- 1000's of these --> <Term>kitty litter</Term> </TermList> A simple SAX parse of this data takes anywhere from 15 to 100 times longer if it is done in a servlet, rather than in a Java application which is reading the data from a file. I have tried reading the data into a string, and using a StringBufferInputStream instead, with no change. I have tried having the servlet read the data into a file first, and then using a FileInputStream, with no change. The problem is not in reading the input, but in doing the parsing. (There is also a small hit for instantiating the parser.) I have tried the following combinations: ServletEngine: iPlanet, Tomcat, JRun Parser: Xerces, JaxP, xp, Aelfred OS: Solaris, Win2000 the best combination is Tomcat + JaxP, the worst is Xerces + JRun. I have tried capturing the system time at each call to startElement() in a SAX DocumentHandler, and I see that the behavior is nearly linear (or linearly bad), with longer documents taking very slightly longer per call. This is killing me. Help. Jeff
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








