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

Re: Parsing efficiency? - why not 'compile'????


compile xml document
Peter Finch writes:

 > Do you think that if there was a way to compiler a document and an
 > open way to edit, query and modify it that people might be more
 > incline to store the documents in a Persistent DOM form (or the
 > like)? I am talking about documents, not data that is just used
 > for interchange.

I used to, but as I've mentioned, this is something that has come up
over and over again during the past five years, and nothing has
succeeded in catching on.

For shorter documents (under 10MB or so), there would probably be
little or no advantage to a binary format -- parsing the whole XML
document into memory in one fast burst is likely much faster than a
lot of random disk access.  Perhaps there just are not enough people
dealing with bigger XML documents to make a compiled format catch on.
Building a DOM tree can be slow, admittedly, because of all the memory
allocation required, but people dealing with more than trivially-small
documents don't generally build a DOM anyway (even if the documents
are human-readable prose).

 > With all the open standards for accessing an XML document, is
 > storing them in a flat file on a filesystem a little inefficient
 > (especially if they are large)? We use databases for record
 > based data and people would never store records in flat
 > files... but isn't that essentially what most people do with
 > their XML documents?

Inefficient in size?  I think that most people just compress them,
then uncompress them on the fly when needed.  That does slow down
reading very slightly, of course.

Note that a naive binary implementation is not small, because you need
to keep several pointers in each node: to beat out compressed XML, you
would have to do a lot of optimization (buckets,
common-prefix-removal, etc.) that will make the format considerably
harder to implement (and thus, less likely to catch on among initial
developers).

 > Is this a view held by most people? Is compiling an XML document
 > into a persistent DOM format a waste of time... if so... why?

I'm taking a free-market perspective -- people have been attempting
and offering this kind of thing for half a decade, and virtually no
one has taken them up on it.

Like you, I can think of cases where a random-access equivalent of an
XML document might be useful, but text-based XML seems to be good
enough that people don't seem inclined to do a lot of extra work for a
small additional advantage.


All the best,


David

-- 
David Megginson, david@m..., http://www.megginson.com/

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.