OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] XML Performance in a Transacation

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: RE: [xml-dev] XML Performance in a Transacation
  • From: Tatu Saloranta <cowtowncoder@yahoo.com>
  • 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= ;

--- Michael Kay <mike@saxonica.com> 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

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 


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS