Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: how to get XML::LibXML perfect xpath query ?

by bluescreen (Friar)
on Jun 13, 2010 at 03:45 UTC ( [id://844395]=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to get XML::LibXML perfect xpath query ?
in thread how to get XML::LibXML perfect xpath query ?

My DOM parser tests compared XML::Simple vs. XML::LibXML in two platforms Solaris 10 and Linux 2.6, all my tests in Solaris ( different documents with different sizes ) showed XML::LibXML was slower than XML::Simple ( It was much slower accessing nodes), as for Linux it was the opposite and XML::LibXML was 8-10x faster than XML::Simple.

On the other hand comparing a SAX parser using XML::Parser vs. a DOM parser using XML::LibXML or XML::Simple, expat won in both Solaris and Linux.

Honestly, I haven't tried XML::LibXML::SAX and maybe it is way faster than XML::Parser.

This link its a bit outdated but It has some benchmarks. Probably things changed notably since then.

Replies are listed 'Best First'.
Re^4: how to get XML::LibXML perfect xpath query ?
by ikegami (Patriarch) on Jun 13, 2010 at 03:58 UTC

    It was much slower accessing nodes

    You seem to have missed "at creating the same Perl-land data structure." Visiting every node was included in the benchmark.

    A task using SOAP::Lite that took two minute was sped up to 15 seconds when I replaced Expat with XML::LibXML as its parser. I kept the change mininal: XML::LibXML was used to create the same data structure that Expat was used to create.

    Honestly, I haven't tried XML::LibXML::SAX and maybe it is way faster than XML::Parser.

    As I mentioned, XML::Parser is by far the fastest existing backend for XML::Simple. I'm pretty sure I've posted benchmarks on PerlMonks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://844395]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-03-28 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found