Alexey Loubyansky [
http://community.jboss.org/people/alex.loubyansky%40jboss.com] replied
to the discussion
"first stax performance test"
To view the discussion, visit:
http://community.jboss.org/message/542122#542122
--------------------------------------------------------------
I've tested the latest woodstox 4.0.8. And also have found a simply stupid bug in my
previous test: XMLInputFactory was an instance variable instead of being a class variable.
Sorry, that makes the previous tests not fare wrt StAX.
I've re-run the tests only for XB just switching the parsers: SAX, JDK StAX,
Woodstox.
For all the parsers validation was disabled, namespace awerness enabled, XInclude
disabled.
XB features: property replacement disabled, default reflection-based handlers.
|| *
* || *JDK6 SAX* || JDK6 StAX
|| *Woodstox* ||
| first run (in ms) | 119.9 | 21.8 | 79.5 |
| next 1000 runs (in ms) | 939.2 | 546 | 463.3 |
Woodstox takes longer to initialize but the total time (first plus subsequent 1000 runs)
is still slightly better than the JDK's StAX (542.8 vs 567.8).
WRT the XB testsuite, Woodstox showed the same failures as the JDK6 StAX, i.e. no support
for default attribute values (same reason, i.e. schema validation is not supported) and
XInclude.
Woodstox does support validation but only for DTD, which is not that interesting now.
It does make sense to look into switching to a StAX impl, which means the limitations
above will have to be addressed. Default attribute values could be specified with Java
binding annotations or initialized manually. But XInclude still has to be implemented.
I'm gonna look into that.
Another thing, entity resolution (which is in JBossEntityResolver) will have to be adapted
as well. StAX API, of course, doesn't use SAX's EntityResolver and InputSource.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/542122#542122]
Start a new discussion in JBoss XML Binding Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]