DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21331>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21331 addTextNode() and getValue() extremely slow when Xerces is used as the XML parser Summary: addTextNode() and getValue() extremely slow when Xerces is used as the XML parser Product: Axis Version: 1.1rc2 Platform: PC OS/Version: Windows XP Status: NEW Severity: Major Priority: Other Component: Basic Architecture AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I am using reading and writing SOAP messages using the Axis API and found that if I've set Xerces (2.4.0) as my XML parser, these calls consume a LOT of time. 1) addTextNode() method in the org.apache.axis.message.MessageElement class is very slow. Did more digging, and the problem code is in the org.apache.axis.message.Text class where it creates a new org.w3c.dom.Document (and DocumentBuilder) every single time addTextNode() is called. For some reason, creating a new Document and DocumentBuilder in Xerces is slower compared to Crimson (Crimson is the default for Sun JDK1.4.x), and without caching of some sort, this just make the whole exercise of adding text node to an element unacceptably slow. Tried it with Crimson as the parser, and it was very fast! 2) getValue() method in the org.apache.axis.message.MessageElement class is very slow. This problem is very similar to the one in (1) above, in the sense that a new Document (and hence DocumentBuilder) is created each time getValue () is called. The problem code is in getAsDocument() in MessageElement. Again, tried it with Crimson, and it was very fast! Xerces has somehow put more penalty for creating DocumentBuilder and Document, so Axis might want to think of caching them for reuse and speed up things. This bug is quite critical, as it really slows down our application, and we have to put a pretty ugly hack to get around it (and yes, we have to use Xerces 2.4 onwards for our application).
