JSR-173 introduces the Streaming API for XML (StAX) which is a standardized Java based API for pull-parsing XML, developed though the community process.
- Posted by: barlie davidsonb
- Posted on: September 01 2005 12:47 EDT
The Java Web Services Performance team has produced a document describing the Sun Java Streaming XML Parser (SJSXP), a freely available implementation of JSR-173, and some of its performance characteristics. SJSXP is scheduled to be part of Java 6.0, so awareness of its performance will be quite relevant in the future.
They're inviting Java developers to read the paper and join the discussion with the Java Performance Community.
- Woodstox Rocks! by Dan Diephouse on September 01 2005 17:24 EDT
- thanks for posting the article by peter lin on September 01 2005 22:54 EDT
- StAX vs SAX? by hacking bear on September 02 2005 06:42 EDT
The paper shows that both woodstox (http://woodstox.codehaus.org) and the SJSXP blow the other ones (the RI, BEA and Oracle) out of the water. It appears that either SJSXP/Woodstox can be faster depending on the scenario. I can't tell what version of woodstox they're using but I think its 1.x. I would guess that 2.0 would probably be even faster.
I did some of my own tests between the RI and Woodstox once with XFire. Using woodstox gave a 30% performance boost. Not to mention the RI has many quirks and bugs. I would highly recommend using Woodstox for all your StAX needs.
Agreed with all of that Dan - Woodstox rocks! Tatu deserves a lot of credit for making a kick ass StAX parser.
That was a good read. It will be nice to have a good pull parser that is standard part of the JDK. I've been using XPP3 for a while now and it rocks.
congrats to the sun team for producing a good stream parser. I look forward to using it.
How do these StAX pull-parsers compare to SAX parsers in terms of performance? (I understand StAX will be easier to program with than SAX.)
How do these StAX pull-parsers compare to SAX parsers in terms of performance? (I understand StAX will be easier to program with than SAX.)In theory StAX should be comparable to SAX - in practice it depends which implementations of each you use. I remember seeing some rough benchmarks from Tatu showing Woodstox to be a fair bit faster than Xerces - but as with most benchmarks YMMV.
It'd be good if the Sun report also includes some SAX parsers too so we can see the comparisons.