OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: half-baked parsers vs binary XML

[ Lists Home | Date Index | Thread Index ]
  • From: "Matthew Sergeant (EML)" <Matthew.Sergeant@eml.ericsson.se>
  • To: "'Gabe Beged-Dov'" <begeddov@jfinity.com>, David Megginson <david@megginson.com>
  • Date: Mon, 29 Mar 1999 10:54:31 +0200

> -----Original Message-----
> From:	Gabe Beged-Dov [SMTP:begeddov@jfinity.com]
> 
> Another reason (other than the binary XML thread) that I brought this up
> was discussion on
> the perl-xml mailing list of whether XML::Parser was usable for soft
> real-time server side
> processing. The consensus there seems to be no.
> 
	I think it's "Yes" - if you do it right.

> XML::Parser is layered on expat. Anecdotal evidence seems to be that there
> is an order of
> magnitude performance advantage to "parsing" something other than XML. The
> two alternatives
> are a textual format that Perl can eval directly (Data::Dumper) and a
> binary format
> (Storable).
> 
> In both cases (Data::Dumper and Storable) there is conversion from the
> on-disk format to the
> in-memory format. Why is XML so much slower according to developer
> feedback? That is what I
> was trying to understand from other peoples experience rather than doing a
> hands-on analysis
> myself.
> 
> I may have jumped to the conclusion that it was the extra work that a
> well-formedness
> processor has to do over what a half-baked processor would do. That still
> leaves the quesion
> of where the slowdown is and whether it is an implementation issue or
> inherent is some aspect
> of XML parsing.
> 
	I think the real problem is that you're doing 2 stages of work with
XML::Parser, as opposed to using Storable or Data::Dumper. With XML::Parser
I'm reading the XML and searching (querying) for specific nodes within the
XML. There's work there that has to be done in finding the nodes. If I could
just call parsefile() without any extra work I think it would be fast
enough. What I'm really doing, by using Storable is caching the parse+query
phase. That should really be considered standard practice for any high
performance system.

	Matt.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

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

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