Main > Software Forum

Aaron removes xml2info as of u12 (in other words, we are screwed)

<< < (6/16) > >>

cuavas:
I can't believe I'm reading this.  My Mac frontend that I have under development parses the entire listxml output, the mameinfo.dat and history.dat files in 15 seconds on a 1.5GHz PowerBook.  I am using libxml2 to parse the listxml output, which is a slow DOM parser.  I could make it a lot faster if I used expat or something else.  I just use libxml2 because it's easy and included with OSX (and I only parse the data once before storing it in a different format).

My code for processing the XML is tiny compared to the code I had for reading the old format.  With the XML I can lean on libxml2, while the old format required me to do all the parsing myself.  I know which I'd rather use.

If your parser chokes, use a better parser.  If your parser is too slow, use a faster parser.  If your code is too complex, you aren't using the libraries properly.

Howard_Casto:

--- Quote from: cuavas on July 17, 2006, 09:52:05 pm ---I can't believe I'm reading this.  My Mac frontend that I have under development parses the entire listxml output, the mameinfo.dat and history.dat files in 15 seconds on a 1.5GHz PowerBook.  I am using libxml2 to parse the listxml output, which is a slow DOM parser.  I could make it a lot faster if I used expat or something else.  I just use libxml2 because it's easy and included with OSX (and I only parse the data once before storing it in a different format).

My code for processing the XML is tiny compared to the code I had for reading the old format.  With the XML I can lean on libxml2, while the old format required me to do all the parsing myself.  I know which I'd rather use.

If your parser chokes, use a better parser.  If your parser is too slow, use a faster parser.  If your code is too complex, you aren't using the libraries properly.

--- End quote ---


Your using a mac so your points are invalid.  Mac parsers probably handle it better, I dunno, I never touch the things. 

cuavas:
Excuse me, but think before you post.  libxml2 is not a Mac parser, it is a cross-platform XML parser.  It was originally part of the Gnome and runs on just about anything.  Try going to http://www.xmlsoft.org/ and reading some of the documentation.  expat is also cross-platform.  I expect both these parsers would perform better on Intel hardware than PowerPC due to the higher clock speeds of the chips.

C is a cross-platform language so my comparison of code complexity is also valid.  I would have to write the same amount of crap in C to parse the old info format on Windows as I do on a Mac.  The API to libxml2 is the same on Windows as anything else, so the code to use it would be just as simple.

The only difference is that I would have to include a copy of libxml2 with the distribution under Windows because the library isn't included with the OS.

Howard_Casto:
I don't mean to offend but think before you post.  You never mentioned what you were using to parse xml.  How was I supposed to know you were using libxml2? 

Also the interface to said libraries is undoubtedly different on various platforms and languages. 


Regardless, if you'll read above before you started I said "I'm done complaining." I've got a parser setup for myself at this time.  It's cludgy and even with sax's help it's noticably slower than listinfo parsing, but it'll work (for now) so I'm happy. 

Also, due to the new control stuff added by rebel, I can add a new "generic output" feature to j5, so at least something good came out of this bad decision.

cuavas:
Maybe if you actually read my original post, you'd realise that I said "I am using libxml2 to parse the listxml output, which is a slow DOM parser."  Your assertion that my comments are invalid or irrelevant because I am am using some kind of "Mac parser" is what I was objecting to in the second post.

The thrust of my original post was that the comments in this thread about XML taking minutes to parse and being more difficult to write code to interpret are silly.  There are parsers that will eat it quickly, and because you can use an off-the-shelf parser, you require less complex code - the hard work has already been done in writing the libraries.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version