Search the web
Sign In
New User? Sign Up
xmlpull-user
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: SAX parser performance   Message List  
Reply | Forward Message #22 of 308 |
Jimmy Zhang wrote:

> I have some questions on the meanfulness of performance metrics of
> all the SAX or Pull based parsers. In my view, all stream based
> parsers doesn't take into the account that the user-implemented data
> extraction logic that imbedded into the call-back functions (SAX) may
> be far more costly than the raw parsing itself. Here is my analogy of
> someone walk into a japanese restaurant:

hi,

that is right and nobody expects DOM to be faster but still it is
important to know what is overhead of creating of all XML in memory
(DOM) when compared to streaming parsing (SAX).

> Using DOM parsers is like order Sashimi (fish meat) that has all
> bones removed, so although one waits a little
> longer for the fish meat, once he gets it, he will be able to eat very
> fast.
>
> Using SAX is like getting the whole fish, one has to cut the fish open
> and get rid of all the organs and bones. Even
> he gets the fish very very quickly, it is going to take him a while
> before he can eat anything.
>
> My point is that all metrics on raw SAX or Pull parser is deceiving.
>
> I am looking forward to your comments.
>

interesting analogy - based on this analogy i would say: DOM parser
gives you raw meat and you have to cook it yourself (or eat it raw if
you like it but not all food is good for it) however SAX and XmlPull
gives you preparation/conversion/cooking tools (XML events that are
transient) and you only have to deal with raw product shortly just
enough to produce what you really like to have (including DOM as most
DOM implementations uses SAX to construct DOM tree ...).

extending this analogy: in XPP2 i have XmlPullNode that allows both to
do DOM-like navigation but also to skip parts of XML tree or to presents
them as XmlPullParser (or SAX2) events so you can have both approaches
and apply them both to different parts of the same XML document if
needed :-)

thanks,

alek

--
"Mr. Pauli, we in the audience are all agreed that your theory is crazy.
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr





Mon Jan 27, 2003 2:15 pm

as10m
Offline Offline
Send Email Send Email

Forward
Message #22 of 308 |
Expand Messages Author Sort by Date

... hi, that is right and nobody expects DOM to be faster but still it is important to know what is overhead of creating of all XML in memory (DOM) when...
Aleksander Slominski
as10m
Offline Send Email
Jan 27, 2003
2:15 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help