Return-Path: Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: (qmail 46315 invoked from network); 25 Jun 2008 08:13:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2008 08:13:23 -0000 Received: (qmail 1110 invoked by uid 500); 25 Jun 2008 08:13:24 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 1081 invoked by uid 500); 25 Jun 2008 08:13:24 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 1070 invoked by uid 99); 25 Jun 2008 08:13:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2008 01:13:24 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ruwan.linton@gmail.com designates 209.85.142.184 as permitted sender) Received: from [209.85.142.184] (HELO ti-out-0910.google.com) (209.85.142.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2008 08:12:32 +0000 Received: by ti-out-0910.google.com with SMTP id u3so1538122tia.15 for ; Wed, 25 Jun 2008 01:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=/aMfretszkstu8jW/yccW7v89+eqzLUVdCO3VDySp5I=; b=TZxhejD8/4zrOJzWnC0GG8bdQRFiBouk18PVo26g5jgpuDtnCwRqNujrVSTmgAlH4W T/k1EMk4wTSMTFVfeqqwqbxLD0qM2YrbHVJVdlXl0gR7bWShthkb/W7pL0r86Vm5fW+y PpuR1WBbzLgoapadlpBkq/eh/DTEG5IqtHW7E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=ompY/pKwGZRN2bEYlk9dfFP5Glkj1dn4erkkV6Nm6XnWMcdQCcisrd5NhpeVecXFFj Bl4OwBT/ArZYQ4JUtwHOl3eUe5pXCSoD/Yab68JeqpBRJM+fhQBthIBvPS91ORo6YLUB DX4QlVreNvZpoVRtcZ6LeyumMGqpummhUKbtE= Received: by 10.110.26.20 with SMTP id 20mr8050290tiz.20.1214381561396; Wed, 25 Jun 2008 01:12:41 -0700 (PDT) Received: by 10.110.86.17 with HTTP; Wed, 25 Jun 2008 01:12:40 -0700 (PDT) Message-ID: <672a01200806250112h3b305f54ka760bba1f2daf5df@mail.gmail.com> Date: Wed, 25 Jun 2008 13:42:40 +0530 From: "Ruwan Linton" To: dev@synapse.apache.org Subject: Proposal to improve the XSLT performance MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_90_18547191.1214381561372" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_90_18547191.1214381561372 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi devs, >From the performance test figures on this articleI 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 WDYT? Thanks, Ruwan -- Ruwan Linton http://wso2.org - "Oxygenating the Web Services Platform" http://ruwansblog.blogspot.com/ ------=_Part_90_18547191.1214381561372 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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

WDYT?

Thanks,
Ruwan

--
Ruwan Linton
http://wso2.org - "Oxygenating the Web Services Platform"
http://ruwansblog.blogspot.com/ ------=_Part_90_18547191.1214381561372--