synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruwan Linton" <>
Subject Proposal to improve the XSLT performance
Date Wed, 25 Jun 2008 08:12:40 GMT
Hi devs,

>From the performance test figures on this
article<>I found that performance for the
XSLT transformations shows a drastic drop
in performance with increasing the message size. There fore I did some
research on improving the performance of XSLTMediator.

First I though of trying to switch to SAXON as the XSLT processor thinking
that it will be faster than XALAN, but when I try to switch the transformer
it gives an error because of the fact that we create a StaxSource as the
default javax.xml.transform.Source to the transformer, which seems to be not
compatible with SAXON.

Then I have used the dom feature to enable DOMSource as the transform source
and the DOMResult as the result, which was successful but at the same time
was unable to improve the performance with compared to the xsltc transformer
(org.apache.xalan.xsltc.trax.TransformerFactoryImpl) of XALAN.

Then I did some more tests and thought of removing the StaxSource and giving
the Source as a StreamSource with using the TemporaryData class backed data
source. This has shown a considerable improvement to the XSLT transformation
and now for 5K messages Synapse is 3-4 times faster than the one we are
currently having. Also for 1K messages it shows some improvement. (There is
no clear difference between XALAN xsltc and SAXON-b, though SAXON-b shows a
little better figures)

There for I propose to remove the StaxSource and use the StreamSource due to
the following 2 reasons;

   1. It seems like StaxSource is not compatible with some of the XSLT
   processors (SAXON)
   2. Using StreamSource we can get a vast improvement in the performance
   for large messages

I would like to use SAXON-b (open source version of SAXON) as the default
XSLT processor, but it has a limitation on Schema awareness. Well, it
doesn't do much harm even though we keep XALAN but StaxSource has to be
replaced with the StreamSource



Ruwan Linton - "Oxygenating the Web Services Platform"

View raw message