[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML Parser in Servlet Performance Problem

  • From: Jeff Lansing <jeff@p...>
  • To: XML-DEV <xml-dev@l...>
  • Date: Tue, 06 Feb 2001 11:12:21 -0800

servlet xml parser
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.