[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Streaming XML (WAS: More on taming SAX (was Re:
On Mon, 27 Dec 2004 12:00:18 -0800, Daniela Florescu <dflorescu@m...> wrote: > Could you guys please try to clarify for me the answer to the following > question: instead > hand coding steaming applications using SAX, couldn't you write some > XQuery code (with external functions probably) to do the same thing ? > Did you try at least ? Did you try and fail ? If yes, why did it fail ? It depends on what you're trying to do. For many applications, it's perfectly acceptable to have a 1 or 2 second overhead for processing the XML (think of a simple XML publishing system); for many others, it's necessary to handle hundreds or thousands of XML documents every second (think of a busy application server, for example, or a network appliance). So far, no one has shown me a DOM, XSLT, or XQuery-based app that is not at least an order of magnitude or two slower than a hand-rolled streaming application, and that's not even considering the memory overhead. As a matter of fact, many XML consultants get called in precisely because someone designed a prototype using XSLT that ran just fine in the demo but melted in a puff of goo and smoke on the first load test. Unfortunately, the ones who do not call in the consultants simply conclude that XML is too slow and abandon it completely. Right now, those streaming applications are very difficult to write, because (as you suggest) SAX and STAX are low-level APIs. Coming up with commonly-accepted streaming subsets of XPath or XQuery might give the best of both worlds: fast prototyping, as with XSLT or XQuery, *and* decent performance in a real, production-grade system. All the best, David -- http://www.megginson.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|