2010/11/15 Frédéric Demians <frederic@tamil.fr>:
IE just XML::LibXML (Without the sax) which we now know is a lot faster :) Galen's tests essentially do the same thing, except with passing it through MARC::File::XML
Comparisons are odious. DOM uses an underlying SAX parser to load any XML document in memory. DOM is not as SAX parser as itself. Galen tests, as I understand them, show that current MARC::File::XML parser, which include a specif SAX event handler, is slower than loading directly a DOM document. It contradicts the theory. The explanation is, as stated by Galen, that Perl SAX parser implementation is not good... My tests use XML::Simple and so load the whole MARCXML document in memory before rendering it into a MARC::Record object. It gives a picture of the difference between parsing MARCXML in pure Perl vs using an external SAX parser.
I work with the author of XML::Simple .. and he would (and does) tell people not to use it for anything than parsing very simple XML structures. http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm#WHERE_TO_FR... So do I understand from what you are saying, that Galens work is not useful, and that a pureperl XML parser is the only way forward? I hope this is just another language based misunderstanding. Because I disagree totally if not. Chris