On 6/10/06, Curtis L. Olson <[EMAIL PROTECTED]> wrote:
> Ralf Gerlich wrote:
>
> That's the big argument that Ben Supnik gave me.  He converted a single
> airport to an xml represenation and it was about 2Mb just for the one
> airport.

well, i'm sure you are well aware of this Curt, but it needs to be
said out loud, because it tends to propogate the misunderstanding
about XML formats and performance and impact ... as i had to address
this during my discussion of this issue on the x-plane lists ...

the 2MB figure, is the "on disk" or serialized form of the XML.

now, if people are concerned about disk space, then, there is no
answer there i guess, knowing of course that you can now buy
half-terabyte drives for a couple of hundred bucks.

and of course, XML is highly compressible ...

the "in memory" or de-serialized XML is of course _much_ more
efficient, since a bulk of that footprint is in the element names and
markup itself.

if you are using an event based parser, then you can make storage of
the data as trim as you want.

if you are using a DOM based parser, then the XML is still pretty
effecient, because of the use of string pooling/interning, again,
where the element names are the bulk of the "extra" size, and are
highly repetitive in the serialized XML, and end up normalized into a
pool of distinct strings with pointers in the DOM tree.

>  Of course he used the most verbose xml variant he could
> devise, but it is true that the data size would expand, and for this
> particular amount of data, it would likely be a substantial expansion.

and yes, element naming can have an effect on the on disk size.

heck, even taking the records, and stuffing those records, as they are
now, into XML would be a start.

at least then, you could find records in the XML easier, and only have
to worry about field level parsing of the data.

that would be a step ...

> I suggested XML just because I thought it would be fun to watch Austin
> go through the contortions of writing an XML parser. :-)  Yes I know,
> small things humor me. :-)

well, if austin "wrote it", besides being amused by the thought, you'd
have to question his sanity, given the code base of parsers already
available in the wild.

> Curt.

Tony

-- 
X-SA user ? 0.5.1 is out !
XData 0.1 for X-SA is out !
http://x-plane.dsrts.com


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to