You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sc...@lotus.com on 2001/03/02 20:06:59 UTC
FYI: Xalan-J1 vs. Xalan-J2 performance
Even though your tests results are positive, I should mention that the
problem with measuring and testing in XalanJ2 is it's optionality. Some
people that are processing generic DOMs are reporting a performance
degregation with XalanJ2 (though I believe this to be mainly related to a
fairly specific problem).
Also, there are some specific operations that may be slower in XalanJ2.
Our ongoing optimization efforts over the next couple of months will focus
on:
1) elimination of output queuing as much as possible, re., the
AttributeHandler note I sent out.
2) Each execute() method has three parameters, two of which can be put into
the state rather than passed as arguments. This should yield some
performance improvement, and reduce the stack size limitation with deep
recursion.
3) Establish optional interface with Xerces, where it could directly use a
char array buffer supplied by Xalan, eliminating a characters copy.
4) Joe has been working on the FastStringBuffer to do block management of
characters, eliminating expansion-and-copy operations of the character
arrays in stree, and allowing smaller block arrays, which will help garbage
collection a lot.
5) The big one is knowing when we can throw away (or reuse) source tree
objects, based on stylesheet analysis.
6) Redundant expression elimination at the XSLT level.
7) More iterator specialization.
-scott
----- Forwarded by Scott Boag/CAM/Lotus on 03/02/01 01:01 PM -----
"Chris P. McCabe"
<chris_mccabe@choiceh To: xalan-dev@xml.apache.org
otels.com> cc: (bcc: Scott Boag/CAM/Lotus)
Sent by: Subject: FYI: Xalan-J1 vs. Xalan-J2 performance
cmccabe@choicehotels.
com
02/28/01 01:47 PM
Please respond to
xalan-dev
For those that are curious, I did a quick timing comparison between
Xalan-J1 and Xalan-J2 on some real-world test cases and the results are
summarized below. All the pages shown were run several times and the times
are an average of all but the first run. The first run includes the
compiling of the stylesheet. All subsequent runs are using a cached
stylesheet.
These are not benchmarks that exercise particular operations. They are
just real-world cases. Each page is generating HTML.
Times are in milliseconds. The first number in the pair is the first
run, the second is the average of all subsequent runs.
Xalan-J1 Xalan-J2 Improvement
-------------------------------------------------
Page1 6605/1728 1420/1256 4.7x / 1.4x
Page2 2437/ 763 659/ 326 3.7x / 2.3x
Page3 2609/ 580 436/ 265 6.0x / 2.2x
Page4 2151/1446 1295/ 524 1.7x / 2.8x
Page5 3313/1142 1556/ 708 2.1x / 1.6x
Page6 4110/ 863 1573/ 538 2.6x / 1.6x
Page7 4954/2687 3508/2339 1.4x / 1.1x
Memory usage: 105K increase in memory usage with Xalan-J2 over 7 pages.
So as you can see, there is roughly a 2x speed improvement (where it
counts) with Xalan-J2 over Xalan-J1. Good work guys!!
Chris