Hi Justin,
   It took some work and I can't give you measurements, but we set up consecutive transformations in separate threads and got better results than using byte array buckets.  The output from one goes into something like a PipedOutputStream and is read by the next transformer from something like a PipedInputStream.  The biggest challenge was error handling and deciding which transformer hit an error first.  This was pre-release of the java.util.concurrent api and I think it would be easier now.

Alex 

On 5/9/2013 12:28 AM, Justin Lipton wrote:
Hi,
We have a chain of transforms that we need to send our XML through.
For a long time we've been using sequential transforms (with intermediate results in byte arrays) that use one Transformer after another.
We started looking at piped transforms using TransformerHandlers to do exactly the the same operation but found the performance was no better - in fact it was a little worse.

Attached is a modifed example of the Pipe sample from: xalan-j_2_7_1\samples\Pipe\Pipe.java
Even with this trivial example, the sequential transforms outperform their piped equivalents.

This raises the following questions:
- what are the scenarios where a piped transform is expected to outperform a sequential transform?
- are there any techniques to get better performance out of piped transforms?

Regards,

Justin.


--
Alex R. Fuller | Manager
Oracle UGBU Product Development