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

Re: RE: Pushing SAX events out onto the Web?


converting sax events to xml
8/14/2002 10:24:23 AM, "Dare Obasanjo" <dareo@m...> wrote:

>One is sending an XML string once while the other is sending multiple custom messages corresponding to the number of SAX 
parse events in XML string you are parsing. One is straightforward the other is convoluted. One is relatively quick, the 
other is slow as molasses. One is...
> 
>You get the point. 

Most of you probably write a lot more code than I do these days, so forgive this brief pontification:  I'm not sure about 
Roger Costello's situation, but there may be a general "antipattern" that assumes a priori that the overhead of XML text 
parsing is a significant bottleneck and goes to great lengths to preserve the parsed representation somehow.   Of  
course, you'll just have to profile your own applications to figure this out, but I know I have wasted months trying to 
figure out how to avoid the "inefficiency" of parsing XML data multiple times as it flowed between different modules of a 
system. Subsequent analysis showed the overhead of parsing the XML to be roughly similar to the overhead of converting 
binary data structures back and forth, and sending the text around greatly simplified the architecture.  

I've heard variations on this story often enough to think that it *is* a fairly general rule of thumb:  XML is not that 
hard to parse, the folks at Microsoft, Apache, or wherever have worked hard on optimizing their parsers, and you're not 
likely to beat their code with a quickly designed binary format.  At least *profile* a text-based prototype using off-
the-shelf parsers before you conclude that the parse time is a significant bottleneck in your app that needs to be 
optimized.




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.