cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Franz <>
Subject Re: How to improve performance? C++? compile XSL?
Date Tue, 20 Jun 2000 14:45:30 GMT
On Tue, 20 Jun 2000, Stefano Mazzocchi wrote:

> Jack BENNETTO wrote:
> > Has anyone tried using it
> > with the C++ version of Xalan/Xerces? (would that work, writing Java
> > wrappers around them?)
> We did some test and for some JVM the Java version of Xerces is faster
> than the C++ version. Believe it or not! I have no idea for Xalan, but I
> assume that if the loops are tight enough an a hotspot JVM is used, for
> server side performance Java might beat C++.

I benchmarked them both on some moderate sized datasets. Xalan_C is
roughly 2x faster than Cocoon 1.7.4 in my configuration. Still not
screamingly fast on XSLT tranforms, however. On my test machine, Xalan_C
parsed the XML data at about 296Kbytes/second, and rendered the output at
about 14Kbytes/second (tranformation stage) on a PII 300Mhz system.

My local performance solution is a 'post-processing' cache.

I've also had problems with Cocoon 1.7.4 giving irregular server errors
where it fails unpredictably (fails/works on successives executions with
no data/stylesheet changes being made. Nasty failures - 500 Server
errors). (RH6.1/JServ 1.1.1/Apache 1.3.12/Cocoon 1.7.4/Blackdown Java
1.1.7B with green threads).

> Use a hotspot VM with a good GC. Keep the stylesheets as less complex as
> possible, and tune them. (there are several ways to do the same things
> in xslt, some are faster some are slower)

This is true. I saw a 10x difference in speed to do the same task
depending on whether I used <xsl:apply-templates
select="chapter[position()=$section]"> or <xsl:if
test="position()=$section"> to pick out data sections for rendering
(<xsl:if is _MUCH_ faster on that task).

Benjamin Franz

   Perl - A post-modern programming language or a 
   scripting tool gone horribly, horribly wrong? 
                              -- Rob Malda

View raw message