[jdom-interest] RE: JDOM->Xalan question
bjornbak at iuas.dk
Thu Mar 15 08:28:31 PST 2001
I have the setup as you - to parse a xml into a DOM change some data in it
and then transform it with Xalan...
But I just found a interesting debate on Xalan-dev maillinglist with subject
"Baisse de performances XalanJ1-XalanJ2".
A french guy having the same setup as us complained about the performance
degrading changing from Xalan-J 1 to Xalan-J 2..
The answer to him was to that Xalan-J 2 performs better if it's allowed to
parse both xml and xsl itself using it's build in SAX or Trax transformer.
Using stream or SAX input should increase your performance by about half
from XalanJ1. If this is not happening, we would like to see the files so
we can run a performance analysis to see what the problem is. I should
mention that a lot of "//' patterns can be problematic, and could be the
reason for the discrepancy.
And some guy even answers that he has solved the performance problem by:
I used Xerces DOMPrint sample and now "print" the DOM tree in memory to a
stream and reparse it from there with Xerces ....? Yes, I know, and I agree.
But now it is fast enough for my purpose. Maybe this is a solution only
until the next version, cause I don't know what the horse will contain next
So I guess that using JDOM and the SAXOutputter will perform just as well
More information about the jdom-interest