I can't tell what stylesheet Yuan used to run the performance comparison...
I assume it was an identity transform as Morten said.  If you want to do
some real benchmarking, try http://www.datapower.com/XSLTMark/.  These
aren't perfect tests, but they give a better idea of performance
characteristics than a lot of attempts I have seen.  I don't think they
have XSLTC hooked up right now, so it may take a fair amount of effort to
get it running with that framework.  It would be interesting to see a
current side-by-side comparison based on the datapower benchmarks.

It's possible that there are some cases where Xalan interpretive is faster
than XSLTC.  We make some (right now, small) effort to rewrite XPath
expressions and, in a few cases, XSLT constructs, which can make a big
difference.  Also, there are a few cases where we take advantage of very
simple pre-indexing of source tree elements.  Also, for some XPaths our
query strategy may be slightly more sophisticated than XSLTC in that we do
not have to sort the nodes into document order (but I am not sure about
XSLTCs strategy in this respect).

On the other hand, even disregarding compiled vs. interpretive, Xalan
interpretive has to keep track of a lot of state for tooling interfaces,
and takes some other hits for being a very general processor.  Xalan
interpretive was never meant to be the fastest possible XSLT processor,
though we don't think the current performance characteristics suck.  XSLTC
is meant to be the fastest possible XSLT processor.

Most of the good optimization work on Xalan interpretive will eventually
(hopefully soon) be incorporated into XSLTC, by sharing a common Abstract
Syntax Tree (where the rewrite optimizations will be done), sharing the
source tree mechanism, and probably sharing the serializers.

-scott




                                                                                       
                              
                    Morten Jorgensen                                                   
                              
                    <morten.jorgense       To:     [EMAIL PROTECTED], xalan 
dev <[EMAIL PROTECTED]>  
                    [EMAIL PROTECTED]>             cc:     Tom Amiro <[EMAIL PROTECTED]>, Todd 
Miller                        
                    Sent by:                <[EMAIL PROTECTED]>, Myself 
<[EMAIL PROTECTED]>,   
                    Morten.Jorgensen        (bcc: Scott Boag/CAM/Lotus)                
                              
                    @sun.com               Subject:     Re: performance comparison in 
Xalan2                         
                                                                                       
                              
                                                                                       
                              
                    08/20/2001 06:43                                                   
                              
                    AM                                                                 
                              
                    Please respond                                                     
                              
                    to xalan-dev                                                       
                              
                                                                                       
                              
                                                                                       
                              




Yuan,

There is not much of a performance difference between XSLTC and
interpretive XSLT processors unless the stylesheet is somewhat
complex. Most people do the mistake of using an identity
transformation (a pure copy) when comparing the performance of
XSLT processors. What you are doing then is in effect testing the
performance of your XML parser, as 75-85% of the processing time
is spent parsing the input document. If you want to run some
proper performance comparisons you will need a stylesheet with
a bit of "meat".

Thanks,
Morten Jorgensen


> -------- Original Message --------
> Subject: a performance comparison in Xalan2
> Date: Wed, 15 Aug 2001 19:41:03 -0400
> From: "Cheng, Yuan" <[EMAIL PROTECTED]>
> To: "'Tom Amiro'" <[EMAIL PROTECTED]>
>
> Hi Tom,
>
> I compared performance of transformer implementation of xalan and xsltc
in
> Xalan2J TrAX/JAXP interface (Xalan-j_2_2_D9), i.e.,
> org.apache.xalan.xsltc.trax.TransformerImpl and
> org.apache.xalan.processor.TransformerImpl.
>
> I captured exe time on transformer.transform() function (I used bw.xml
and
> opAndSelf.xsl for testing).
>                     Xalan             Xsltc
> avg time             718 ms           756 ms
>
> What supprised me is that xalan seems to out-perform xsltc when xml
parsing
> and transformation are evaluated together. ( I looked into their
> implementations of transformer.transform(), whose operations include
parser
> creation, xml parsing, xsl transformation, etc., but not include translet
> creation.)
>
> Is this true? I would appreciate your comments.
>
> thanks,
> Yuan
> ps: transformerTest.java
>
>
--------------------------------------------------------------------------------

>                            Name: transformerTest.java
>    transformerTest.java    Type: unspecified type
(application/octet-stream)
>                        Encoding: base64




Reply via email to