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

RE: XML Performance in a Transacation

  • To: xml-dev@l...
  • Subject: RE: XML Performance in a Transacation
  • From: Tatu Saloranta <cowtowncoder@y...>
  • Date: Thu, 23 Mar 2006 10:53:09 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=GkUkczGjg2UPWdmSH2NvuljwpwkJEJrzZNCE9RcK+rz+tdFLfSfndsnS2DXOCKlpFOAzclXc75xpGfTg6X8k5ZtQ2JAGNyb42yk4jge6mMATTmOTTXN1N/w0w+MhszKXktMEXK4nKKRwqSMW9IVINgJLGEAyuHu9ALaQA7oTQrY= ;

tatu stax
--- Michael Kay <mike@s...> wrote:

> > my observations - for small messages and documents
> it all seems to be 
> > fast enough (haven't had any performance issues to
> cause me 
> > to measure it).
> 
> One thing I discovered (or rather, which Wolfgang
> Hoschek pointed out to me)
> is that if you are parsing lots of small documents
> you can get a big saving
> by reusing the XML parser rather than instantiating
> a new one for each
> parse. This might be parser-specific, but certainly
> for Xerces there seems
> to be a big initialisation cost.

Indeed. Many of internal data structures (for element
stacks, attribute map, string canonicalization maps,
grammar caches) can be reused, as long as something
binds these together. This is often most conveniently
done by allowing either instances (SAX in general), or
factories (StAX) that create them, to be reused.

Difference in performance can be 3x for small
documents (I noticed this when comparing Sax and StAX
impls -- without recycling, Xerces seemed to performed
badly).

Interesting thing is, when used in 'correct' way,
Xerces is a very fast xml parser; even though
performance is not its top goal (if I understand it
correctly, it's correctness, complete support for
standards etc).

-+ Tatu +-


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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.