[XML-SIG] 4XSLT focus on docbook stylesheets (and fruit thereof)

Hannu Krosing hannu@tm.ee
16 Jul 2002 02:41:41 +0500


On Mon, 2002-07-15 at 12:32, Uche Ogbuji wrote:
> > Thomas B. Passin wrote:
> > > Outstanding!  Any ideas how that compares with the big guns (Xalan, msxml,
> > > saxon)?
> > 
> > I just ran some tests against one of those guns.
> > 
> > The contenders:
> > 
> > 4xslt 0.12.0a3(*), incorporating expat-1.95.2, under Python 2.2.1
> > vs
> > Saxon 6.5.2, with its modified Aelfred parser, running under JDK 1.1.8.
> > 
> > (*) what will become alpha 3, rather
> > 
> > The platform:
> > 
> > Intel PIII-933, 256 MB RAM, FreeBSD 4.6-STABLE.
> > 
> > The test:
> > 
> > Transforming a 450-line, 25K Simplified DocBook article to HTML,
> > using DocBook XSL 1.50.
> 
> [SNIP]
> 
> > Battle #1: The simplest test: command-line, with all the overhead of
> > the JVM and Python interpreter starting up to throw off the results.
> 
> [SNIP]
> 
> > Outcome: 4xslt finishes about 67% faster than Saxon
> 
> [SNIP]
> 
> > Battle #2: A proper test: timing the stylesheet preparation and
> > transformation separately, from code.
> 
> [SNIP]
> 
> > Outcome: 4xslt about 85% faster than Saxon at stylesheet preparation,
> >          and 4xslt about 60% faster than Saxon at transformation.
> 
> Thanks, Mike.  I did rather suspected that we would equal or beat the Java 
> processors at this point.  I expect we'll still get taken by the C processors, 
> but hey!  Ya never know.

To see what a C implementation can do, I tested with xsltproc from
gnome's libxml2-2.4.23-1/libxslt-1.0.19-1

platform Linux RH7.1, Celeron 375, 448MB

this is pure C binary:

[hannu@rh72 xslttest]$ /usr/bin/time -p /usr/bin/xsltproc QuickStart.xml
docbook-xsl-1.52.2/html/docbook.xsl > out.html
real 7.62
user 3.67
sys 0.18


when doing it from python it was lot slower:

[hannu@rh72 xslttest]$ /usr/bin/time -p ./pyxsltproc.py QuickStart.xml
docbook-xsl-1.52.2/html/docbook.xsl > out4.html
real 23.03
user 12.62
sys 0.58

the pyxsltproc.py reported the following times:
  Parsing stylesheet QuickStart.xml took 1249 ms
  Applying stylesheet took 8454 ms
  Saving result took 19 ms

So it seems that actual transform should be somewhat competitive, though
I used 2.5 times slower computer than Mike.

If somebody (Mike ;) would like to include libxslt to his future tests,
the stuff is available from http://www.xmlsoft.org/downloads.html .

It seems to live quite nicely in the same installation with pyXML.

------------------
Hannu