[XML-SIG] pyexpat & xmlproc : irreproductible results!
Alain Michard
Alain.Michard@inria.fr
Wed, 10 Nov 1999 09:16:14 +0100
Dear All,
In a previous message I wrote that xmlproc happened to parse some files
faster than pyexpat does. This was an idea I got weeks ago when doing
some non
systematic testing.
Encouraged by a question from Lars Marius Garshol yesterday, I've spent
my
evening trying to reproduce the results on which my "idea" was based.
This time I tried to be systematic! You'll find the results below.
To make it short, on these tests, pyexpat is always faster than xmlproc,
with a
relative difference which can vary enormously depending on the type of
xml file
and on the application programme.
I apologize for writing down a non supported statement in my previous
mail.
Best regards
Alain
------------------------------------------------------------------------------
Test files:
IA173.xml : Valid document, 20Ko, external DTD, ISO-8859-1 encoding.
BF173.xml : The same document well-formed, without DOCTYPE declaration.
IA352.xml : Valid document, 1300Ko, same DTD than for IA173, ISO-8859-1
encoding.
BF352.xml : The same document well-formed, no DOCTYPE declaration.
------------------------------------------------------------------------------
First set of tests conducted with saxdemo.py, event handler for
outputing
canonical XML (saxutils.Canonizer(out)), standard error handler
saxutils.ErrorPrinter
Second set of tests conducted with parsetimer.py, minimal program,
empty event handler and empty error handler.
-----------------------------------------------------------------
RESULTS in seconds (PC pentium II, 233 Mhz)
-----------------------------------------------------------------
Tests with saxdemo.py
VAL173 BF173 VAL352 BF352
xmlproc_val 8.9 - 364 -
xmlproc 5.7 5.7 320 308
pyexpat 4.9 4.9 285 287
-----------------------------------------------------------------
Tests with parsetimer.py
VAL173 BF173 VAL352 BF352
xmlproc_val 4.5 1.47 106.0 83.0
xmlproc 1.1 1.1 59.0 61.1
pyexpat 0.24 0.24 9.7 9.8
----------------------------------------------------------
Test files are available on request.