[jdom-interest] Performance percentages
jhunter at collab.net
Fri Jun 1 16:06:56 PDT 2001
One thing I've been curious about is how much build time is accounted
for by the sax parser, how much by the verifier, and how much by
building the document structure.
So what I did is timed the build process for several XML files of
varying sizes and types, trying first the code in CVS, then trying with
an empty Verifier (one that reports everything's always OK), then trying
with an empty SAXHandler (one where everything's ignored). For files I
tried the three from Dennis' test plus two big "xlink" files, the first
of which has attributes in namespaces, the second of which does not.
Here's what I found. The three timing values represent the time in ms
for the 2nd parse run, the 3rd run, and the average across the 4th
through 13th run. I ignore the first run. The test code is attached.
Copy the included *.empty files on top of your CVS *.java files and
recompile JDOM to switch between tests.
LATEST IN CVS:
So removing the verifier saves a bit (10% range) on the periodic table
and on xlink. But removing the verifier actually increases (20%) the
time required to build much_ado and xlink2. I'm not sure how to explain
that. Maybe it has something to do with my earlier GC oddities? Could
someone try the test on their machine?
These times represent the fixed costs about which we can do nothing.
Seems we have 2/3 of the build time spent outside of raw parsing, so
optimization has the potential for a profound effect.
Comments welcome on the test model. I'd appreciate it if someone using
hotspot, using JDK 1.3, and using JDK 1.1 could verify similar results.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 133343 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010601/27943268/jdom-perf1.bin
More information about the jdom-interest