[XML-SIG] Side note from the bit 'o challenge

Uche Ogbuji uche.ogbuji@fourthought.com
Sun, 03 Jun 2001 21:02:16 -0600


While struggling with the bugs reported by Stefan and Dieter it occurred
to me to do a bit of timing.  Stefan't test document was an empty one
using Norm Walsh's docbook stylesheets.

These are a veritable XSLT torture test and certainly a good performance
test for the case of simple source document.

Also, when I first posted my challenge earlier asking about test cases
that showed 4XSLT+cDomlette performing excessively more slowly than
other processors (esp. Saxon, which is the benchmark of XSLT
excellence), Dieter suggested docbook.

Here's what I find on my PII 366 + 192MB RAM / RH 7.0 / Python 2.1 /
Blackdown JSDK 1.3 / 4XSLT current CVS and Saxon 6.3

$ time saxon-6.3.sh test.xml /usr/local/lib/xslt/db/html/docbook.xsl
<html><head>
      <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
   <title></title><meta name="generator" content="DocBook XSL
Stylesheets V1.39"></head><body bgcolor="white" text="black"
link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book"
id="d39e1"><div class="titlepage"><hr></div></div></body></html>
real	0m59.264s
user	0m10.290s
sys	0m0.310s

$ export BETA_DOMLETTE=1
$ time 4xslt test.xml db/html/docbook.xsl
STYLESHEET MESSAGE:
No "en" localization exists.
END STYLESHEET MESSAGE:
STYLESHEET MESSAGE:
No context named "title" exists in the "en" localization.
END STYLESHEET MESSAGE:
STYLESHEET MESSAGE:
No template named "book" exists in the context named "title" in the "en"
localization.
END STYLESHEET MESSAGE:
<html><head><meta http-equiv='Content-Type' content='text/html;
charset=ISO-8859-1'><title></title><meta name='generator'
content='DocBook XSL Stylesheets V1.39'></head><body bgcolor='white'
text='black' link='#0000FF' vlink='#840084' alink='#0000FF'><div
id='id168736824' class='book'><div
class='titlepage'><hr></div></div></body></html>
real	1m14.768s
user	0m37.010s
sys	0m0.290s

$ export BETA_DOMLETTE=
$ time 4xslt test.xml db/html/docbook.xsl
<html><head><meta http-equiv='Content-Type' content='text/html;
charset=ISO-8859-1'><title></title><meta name='generator'
content='DocBook XSL Stylesheets V1.39'></head><body bgcolor='white'
text='black' link='#0000FF' vlink='#840084' alink='#0000FF'><div
id='id168718636' class='book'><div
class='titlepage'><hr></div></div></body></html>
real	4m50.594s
user	1m36.970s
sys	0m3.210s

Note that I tried several runs of each situation and got results within
10% each time.

So, I think this bolsters my claim that 4XSLT+cDomlette is a very
competitive processor speed-wise:  75s (4XSLT) versus 59s (Saxon 6.3). 
As I've always known pDomlette is a comparative slow-coach (290s).

One note is that because cDomlette doesn't yet properly handle external
parsed entities, it gains a bit of speed by not processing the docbook
i18n.  However, my tinkering (including forcing 4XSLT to load the i18n
xml for a 1% speed loss) here indicates that the effect of this on
performance is negligible.

I guess the lesson for me is to hurry up and complete the cDomlette
EntityResolver so that we can turn cDomlette on as the 4XSLT default.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python