I noticed that Dom4J 1.5 has support for the XPP2 parser. The developers of 
that are now recommending the XPP3 parser 
http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/index.html which they 
claim is even faster.

So I hacked together a XPP3Reader based on James XPPReader. This should live i 
org.dom4j.io

It seems to work fine. I changed to use this with 1.5 in the latest version of 
my XMLSignature library (http://dev.neuclear.org/xmlsig/) which I should be 
releasing today or tomorrow. So far I haven't noticed any problems and I've 
seen huge speed improvements on the old SaxReader.

I hacked up a completely unscientific comparison on my aging 700MHz P3

This verifies the signature of a very short xml document held in a String, 
which was signed with a RSA Private Key.

1000 iterations using SaxReader:     70,726 ms
1000 iterations using XPP3Reader: 53,642 ms

That is a pretty big difference. In particular when you take in to account 
that the RSA Sig verification eats up a big chunk of the above time.

I haven't done any real pure xml benchmarks but I'm guessing you'll see a huge 
difference.

Please add the code below in CVS if you guys want it.
-P
-- 
http://talk.org      + Live and direct from Panama
http://econotrix.com + Opinionated Rants about BizPolEco
http://neuclear.com  + The World Wide Web of Assets

Attachment: dom4j-1.5-xpp3.tar.bz2
Description: application/tbz

Reply via email to