Sean Ryan wrote:
Hello,
To reproduce this problem I think you will need my XSL and XML files.  But I 
don't want to
overload the mail list... (I already sent a massive message to the subscibe 
address - sorry about
this but I don't use mailing lists much).


Yes, we'll need your input files.

The main app I have is a fairly memory hungry GUI, so I tried running the Xalan 
transform in its
own process,
this helped a bit. The performance in RELEASE is about 2 minutes.
The performance in DEBUG is about 30 mins.
This is similar to the performance of the Xalan sample 
'XalanCallbackTransformer' (RELEASE 2
minutes, DEBUG 11 minutes).


Well, the performance is 3x slower for your application with the debug configuration, so that seems significant.


Are you by any chance using a ostrstream or ostringstream instance as to
hold the result of the transformation?


I am using a callback handler, and it uses a vector of string objects on the 
heap.
I don't think this is related to the problem - nearly all the time is spent 
processing BEFORE
there is more than 1KB of output.


OK.


You cannot build Xalan-C without Xerces-C, and I'm not sure why you


I got the idea from the Apache page:
http://xml.apache.org/xalan-c/usagepatterns.html#xercesdomwrapperparsedsource

"Performance is much better when Xalan-C++ uses native source tree handling 
rather than
interacting with the Xerces DOMParser". What does this mean then, if Xalan cannot be built without Xerces ?


Yes, that could be clearer, but it's a comment about that particular usage pattern. It involves wrapping an instance of Xerces-C's DOMDocument for use as the source tree for a transformation. I will try to re-write some of that documentation to make it a bit clearer.


any performance issues, so why do you think Xerces-C is the problem in your code?

Please show us some code that shows us how you are invoking Xalan-C. In particular, show us how you are handling the output of the transformation.



I believe the problem is with Xalan-C not Xerces-C, since even the sample
'XalanCallbackTransformer' takes 2 minutes in RELEASE build.
Here is my code in any case:

Without knowing the timing breakdown of parsing the source tree, parsing the stylesheet, and the actual transformation, it's hard to determine if that time is excessive.

Here's the best approach, I think:

1. Create a Jira issue and attach your source XML and stylesheet files.
2. Download Xalan-C 1.10 and test to see if there is any performance difference with the latest version of the sample XalanCallbackTransformer application. 3. Run your transformation with the Xalan executable with the -t option, to see the timing information. Also, make sure you redirect the output to a file:

Xalan -t -o foo.out document.xml stylesheet.xsl

That will tell you exactly where the time is being consumed.

Once you create the Jira issue and attach the XML files, someone can look at what's happening. It could be your stylesheet is very complex, and that's the problem. Or, it could be your source file is quite large, and it's taking a long time to parse the source file.

Dave

Reply via email to