Quick Intro to XML performance
August 28th, 2007Was just writing an email which included a two minute introduction to Java XML performance. I thought I’d quickly replicate it here:
There are a few key areas that I see to XML performance. All can have a huge effect – i.e. you could possibly increase performance 2-10x performance by tweaking any one of these.
1. Your XML parser. By far the fastest here is Woodstox. It is a StAX implementaiton, but it also supports SAX as well.
2. Your databinding implementation. The fastest ones are those that compile optimized xml readers/writers for your domain objects. JiBX is a good example. SXC (which I wrote) is another. SXC provides compiled readers/writers for your JAXB context, which can speed it up quite a bit. After those two, the JAXB-RI is probably the next fastest. XMLBeans/XStream are mediocre as I recall.
3. The XML representation. Reading everything into a Document object is very memory and resource intensive. Modern databinding frameworks like JAXB, JiBX, etc can turn the XML stream directly into POJOs. Use those if at all possible.
August 29th, 2007 at 2:05 am
It’s not close related to your post, but it is about the configuration. Try it and maybe you will like it
However it’s DOM based. Link follows:
http://x2jb.sourceforge.net/
September 19th, 2007 at 10:40 pm
The fastest is VTD-XML (much faster than woodstox)
http://vtd-xml.sf.net
October 2nd, 2007 at 6:18 am
Woodstox only claims to be an XML parser. Its apparent speed derives from taking shortcuts and failing to follow the complete XML 1.0 spec. If your data matters to you, don’t even consider it.
Last I checked VTD-XML was also not a full XML parser.
November 9th, 2007 at 5:03 am
test
November 9th, 2007 at 5:04 am
Sorry for the empty post,
XML 2007 is not the same as XML 1997
As to additional path to faster XML try
Index XML documents with VTD-XML
http://webservices.sys-con.com/read/453082.htm
November 15th, 2007 at 1:55 am
Elliotte, I do not know where you get your impression regarding Woodstox xml compliance, but you are incorrect with your allegations. Latest Woodstox versions (3.x series) are very much xml compliant, as indicated by, for example, high pass rate XMLTest/SAXTest pass rate.
I suggest you do some basic fact checking before engaging in browse-by slandering.
February 11th, 2008 at 6:27 pm
cheap homeowners insurance manatee county
goodies neigh harken heart gushes.
February 16th, 2008 at 9:06 am
competitive insurance us van
banqueting rapier discreteness dishonoring!bustard sufficiency
October 4th, 2008 at 4:13 am
health insurance individual nv…
bilking therapy?detaches Frau deadlocking?DECnet,…