I've made some progress on my own worth mentioning...
It turns out that the feature of my data that was causing axis so much trouble was the rather deep xml structure passed around by my schema (using xsd:any ##any): NodeImpl.getOwnerDocument has spectacularly bad behavior on deep structures.
I've submitted a patch attached to jira ( http://issues.apache.org/jira/browse/AXIS-1862 ) that fixes this issue.
Along the way, I stumbled on an alternative implementation of deserialize that performed much better than either your or my original code... at least, until I fixed the NodeImpl performance bug. Essentially, I do the following:
String mstr = ... // the message;
Message m = new Message(mstr,true);
m.setMessageContext(new MessageContext(new org.apache.axis.server.AxisServer()));
javax.xml.soap.SOAPPart part = m.getSOAPPart();
SOAPEnvelope e = (SOAPEnvelope) part.getEnvelope();
SOAPBodyElement be = e.getFirstBody();
MessageElement mel = findFirstArgument(be);
Object result = mel.getValueAsType(myqn, myclass);
I found the basic structure in the axis unit test code. Before I fixed the NodeImpl algorithm, this was around 100x faster than the approaches I tried before.
At any rate, using either the above code or my original code leaves me deserializing a bit more than 1000x faster than yesterday. Can't complain too much about that... ;-)
Thanks, -Michael
Michael Thome wrote:
Thanks for the examples. I've got a few followups, if you don't mind...
Peter Molettiere wrote:
Chances are you're doing it right. My experience is that axis is pretty slow, especially if you have large object graphs to read and write.
I sure hope I'm not doing it right, though so far your solution and mine performs about the same... that is, unacceptably slow by several orders of magnitude - 4 minutes to deserialize a 1KB serialized message!
