OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XSLT with DOM or SAX ?

[ Lists Home | Date Index | Thread Index ]

FYI...  The source of enlightenment as to the proper way of pressure
cooking a processor came straight from MK himself so it definitely has
good foundation obviously (and proper credit should be given to him
for helping me further understand how to properly build a test
sequence for a processor)


On Mon, 28 Mar 2005 02:23:47 -0800 (PST), Mukul Gandhi
<mukul_gandhi@yahoo.com> wrote:
> Hi M. David,
>   The execution time I reported is not for a single
> transformation run. It is average of 5 runs. Every
> single run varies slightly (by few milliseconds;
> sometimes it is same).. So average needs to be taken.
> 
> I agree that my method will not say truly about the
> performance characteristic of the processors. We need
> to measure time over a wide range and size of
> transforms..
> 
> I'll surely read the details on your site.
> 
> Regards,
> Mukul
> 
> --- "M. David Peterson" <m.david.x2x2x@gmail.com>
> wrote:
> 
> > Hey Mukul,
> >
> > As I have learned from creating similar tests and
> > posting the results
> > there are too many outside factors that go into
> > these one off
> > measurements to put any sort of weight on the
> > result.  If interested,
> > after I discovered the details of how to properly
> > pressure cook a
> > processor I created a quick little test suite that
> > takes any given
> > piece of XML, creates a range of file sizes
> > (dynamically specified in
> > the config file) and combines this with a structured
> > series of
> > commandline sequences to properly put a processor to
> > the test in sets
> > of 1, 3, and 9  iterations through the same XML
> > file, outputting the
> > results into seperate files that can then be used to
> > develop a much
> > more qualified understanding of what your dealing
> > with...
> >
> > I actually have several iterations of this original
> > test-suite (it was
> > a quick hack... its "grown-up" quite a bit since and
> > I plan to release
> > the new and improved version around the same time
> > Saxon.NET goes from
> > RC1 > RC2 > 1.0 Final in the next week or so) but
> > for now if you want
> > to play around with it you can access the file and a
> > quick explanation
> > of how it worls here >
> >
> http://www.xsltblog.com/archives/2004/12/next_portion_of.html
> >
> > Have fun :D
> >
> > <M:D/>
> >
> >
> > On Mon, 28 Mar 2005 01:25:35 -0800 (PST), Mukul
> > Gandhi
> > <mukul_gandhi@yahoo.com> wrote:
> > > I did a small performance comparison between
> > Xalan-J
> > > 2.6.0 and Saxon 8.3 . I ran a simple identity
> > > transform on a small XML file.
> > >
> > > The XSLT is -
> > >
> > > <?xml version="1.0"?>
> > > <xsl:stylesheet
> > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> > > version="1.0">
> > >
> > > <xsl:output method="xml" indent="yes" />
> > >
> > > <xsl:template match="@* | node()">
> > >   <xsl:copy>
> > >    <xsl:apply-templates select="@* | node()" />
> > >   </xsl:copy>
> > > </xsl:template>
> > >
> > > </xsl:stylesheet>
> > >
> > > Average execution time recorded were:
> > > -------------------------------------
> > > Xalan-J 2.6.0 :
> > > with -DIAG option 220 ms
> > >
> > > Saxon 8.3 :
> > > with -TP option 47 ms(Saxon's performance analysis
> > > tool)
> > > with -t option 63 ms
> > >
> > > It seems Saxon is faster than Xalan. It seems upto
> > > about 4-5 times.. I am assuming both Xalan and
> > Saxon
> > > are measuring the same things!
> > >
> > > If "GNU JAXP XSLT processor" is 2.8 times faster
> > than
> > > Xalan , then Saxon is approximately 2 times faster
> > > than GNU XSLT processor ..
> > >
> > > I read in an article by Michael Kay that Saxon
> > uses an
> > > efficient tree structure suited for XPath data
> > model..
> > > DOM and XPath tree models don't map 100%. But I am
> > not
> > > sure what Xalan uses.. I guess it is DOM or a
> > slight
> > > variant of it..
> > >
> > > Regards,
> > > Mukul
> > >
> > > --- Chris Burdess <dog@bluezoo.org> wrote:
> > > > Michael Kay wrote:
> > > > >> What kind of parser is best to use for XSLT
> > > > transformations ?
> > > > >> SAX or DOM
> > > > >
> > > > > XSLT processors will in general build a tree
> > > > representation of the
> > > > > source
> > > > > document in memory. And in general, many of
> > them
> > > > will build a tree
> > > > > representation that is much more efficient
> > than
> > > > using a
> > > > > general-purpose DOM.
> > > > > So there's no point building an inefficient
> > DOM
> > > > tree rather than
> > > > > letting the
> > > > > XSLT processor build its own. But this advice
> > may
> > > > depend on the XSLT
> > > > > processor you are using.
> > > >
> > > > For what it's worth, the GNU JAXP XSLT processor
> > > > uses DOM internally
> > > > for both source and result trees, and is about
> > 2.8
> > > > times as fast as
> > > > Xalan on a wide range of transformations (the
> > OASIS
> > > > XSLT/XPath
> > > > conformance suite). I don't have figures for
> > memory
> > > > usage or
> > > > comparisons with Saxon though.
> > > > --
> > > > Chris Burdess
> > > >
> > > >
> > > >
> > >
> >
> -----------------------------------------------------------------
> > > > The xml-dev list is sponsored by XML.org
> > > > <http://www.xml.org>, an
> > > > initiative of OASIS <http://www.oasis-open.org>
> > > >
> > > > The list archives are at
> > > > http://lists.xml.org/archives/xml-dev/
> > > >
> > > > To subscribe or unsubscribe from this list use
> > the
> > > > subscription
> > > > manager:
> > > > <http://www.oasis-open.org/mlmanage/index.php>
> > > >
> > > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail - now with 250MB free storage. Learn
> > more.
> > > http://info.mail.yahoo.com/mail_250
> > >
> > >
> >
> -----------------------------------------------------------------
> > > The xml-dev list is sponsored by XML.org
> > <http://www.xml.org>, an
> > > initiative of OASIS <http://www.oasis-open.org>
> > >
> > > The list archives are at
> > http://lists.xml.org/archives/xml-dev/
> > >
> > > To subscribe or unsubscribe from this list use the
> > subscription
> > > manager:
> > <http://www.oasis-open.org/mlmanage/index.php>
> > >
> > >
> >
> >
> > --
> > <M:D/>
> >
> > :: M. David Peterson ::
> > XML & XML Transformations, C#, .NET, and Functional
> > Languages Specialist
> >
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
> 


-- 
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS