[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DOM or SAX: Sense and Sensibility


sense vs. sensibility

From: "Benjamin Franz" <snowhare@n...>


> On Wed, 7 Nov 2001, PaulT wrote:
>
> >
> > > NOT reading/parsing and rereading/reparsing relatively static
> > > XML documents gives me a huge performance boost.
> >
> > I was under impression that it should usually give
> > about 10-15% boost. Is that 'huge' ?
>
> Using Saxon's native 'DocumentInfo' tree in memory - an at least 10X
> _plus_ performance boost on large documents vs starting from scratch with
> the serialized XML document. I think that _is_ huge.

I also think that 10X _is_ huge, but I think there is some misunderstading.
Let me elaborate.

> > > In fact that is the major reason why I moved from SAX
> > > based XSLT rendering to DOM based rendering for the vast majority of
our
> > > stuff.
> >
> > XSLT rendering is not 'SAX based'. It is 'OM-based'.
>
> I should have been more precise in my language;

Same here.

> 'Live-parsed' vs 'statically cached-OM' then.

So, we have 'document.xml' and tranfromation 'transform.xsl'

1. We load document.xml from XML, we apply the
transformation 'transfrom.xsl'

total time is t1.
- t1.1 is time of parsing XML into OM,
- ttrans is time of transformation

t1.1 + ttrans = t1

2. We load document.xml from binary OM, we apply
the transformation 'transfrom.xsl'

total time is t2.
- t2.1 is time of loading XML from OM,
- ttrans is time of transformation

t2.1 + ttrans = t2

It could be that t1.1 * 10 = t2.1

However, I'm talking about  t2 and t1.
Of course, it is important how big is the
document.xml and how complex is transform.xsl,
but my point is that 'in general', for 'typical transfrom',

the difference between t1 and t2 is 10-15%

I have an impression, that you're comparing t2.1 vs t1.1.
From my point of view that's part of the transfromation
is usually not  a problem. ttrans is usually a 'real'
showstopper ( and I should stress out that ttrans
is also sensitive to chaching of the stylesheet
( to avoid recompilation of the stylesheet ) )

When saying 'typical transfrom' I'm talking about
files of 10-50K

If you have some numbers, I'd be glad to look at them!

Maybe current XSLT engines are now soo fast that
time of parsing XML into OM is a real showstopper,
but last time I checked it was the transfromation itself
that was eating the time. Compilation of stylesheets
was also ... important ... part ...

Rgds.Paul.



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.