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] performance comparison

[ Lists Home | Date Index | Thread Index ]

Title: RE: [xml-dev] performance comparison


I'll provide some quick, basic feedback on #3 below ("why is DOM memory hungry") and defer to others to comment on the rest.  Unlike SAX, the DOM represents an entire XML document in memory in the form of a tree (called the "document tree").  SAX is an event-based API which does not need to build an internal tree.

From the site sax.sourceforge.net:

"Tree-based APIs are useful for a wide range of applications, but they normally put a great strain on system resources, especially if the document is large. Furthermore, many applications need to build their own strongly typed data structures rather than using a generic tree corresponding to an XML document. It is inefficient to build a tree of parse nodes, only to map it onto a new data structure and then discard the original."

"In both of those cases, an event-based API provides a simpler, lower-level access to an XML document: you can parse documents much larger than your available system memory, and you can construct your own data structures using your callback event handlers."

Hope that helps,
Joe Chiusano

> **************************************************************************
>   Joseph M. Chiusano
>   Logistics Management Institute
>   2000 Corporate Ridge
>   McLean, VA 22102
>   Email: jchiusano@lmi.org
>   Tel: 571.633.7722
> **************************************************************************

-----Original Message-----
From: zhengyu@attbi.com [mailto:zhengyu@attbi.com]
Sent: Thursday, July 11, 2002 7:32 PM
To: Xml-dev@lists.xml.org
Subject: [xml-dev] performance comparison


 I am evaluting various XML technologies right now.
Although I have used XML before, but in terms of
the real-world performance, I still need help.

  My questions are:

  1.  I have read numerous comparisons between SAX and
DOM, the test benchmarks mostly did straight comparisons
between the two, I think it is very misleading. Am I
right on this? DOM

  2.  Most people mention SAX can handle files larger
than memory, but I am thinking, is this really the case,
because files are read into the kernel buffer, so large
files still have to be read into the memory, just not in
user space. Am I right?

  3. DOM is memory-thirsty, according to most articles I
read. So DOM's performance lags, does anyone run any type
of profiling, and I am interested in why it is memory
hungry, and poor in terms of performance.

  4. What do people think of pull type parsers and DOM
SAX hybrids? Are these popular and stable?

  5. Is it possible for SAX to support XSLT?



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://lists.xml.org/ob/adm.pl>


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

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