cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Pooled XSLT TransformerHandler
Date Sun, 03 Feb 2002 09:59:36 GMT
Vadim Gritsenko wrote:

>Are there any issues if javax.xml.transform.sax.TransformerHandler is
>pooled (except increased memory utilization)? I did some quick prototype
>and results are encouraging:
>1. Current CVS
>  Requests per Second:          11.32
>  Page                            Hits      TTFB Avg  TTLB Avg
>  ============================================================
>  GET /cocoon/sub/xsp-cocoon      3400      581.52    850.56  
>2. Pooled XSLT TransformerHandler
>  Requests per Second:          93.88
>  Page                            Hits      TTFB Avg  TTLB Avg
>  ============================================================
>  GET /cocoon/sub/xsp-cocoon      28147     77.38     77.91   
>Test was executed for the 10 minutes. Throughput increased to 829% of
>original, page processing time decreased to the 13% of original time.
>PS: Remember that these results are for the very simple XSLT stylesheet
>(see sitemap). On more complex stylsheet - this change will have smaller
Impressive results !

The Trax spec says that a Transformer can be used multiple times, but 
nothing is said about the reuse of TransformerHandler. However, since 
SAXTransformerFactory.newTransformerHandler(Templates) creates a new 
Transformer (at least Xalan's implentation), the only way for us to 
reuse a Transformer is through the reuse of the TransformerHandler.

Now there may be an issue if the transformation ends abruptly because of 
an exception : in that case, we should garbage the handler so that it is 
not reused. We already do that for parsers in JaxpParser, but this is 
not as easy here since the handler is used out of the control of the 
XSLTProcessorImpl. So what about adding a kind of 
release(TransformerHandler) on XSLTProcessor that can be used to return 
a handler once sucessfull transformation has ended ?


Sylvain Wallez
Anyware Technologies -

To unsubscribe, e-mail:
For additional commands, email:

View raw message