Fastest XML parser for Perl

My perl application is doing a lot of xml file input and output, and I'm finding that the bottleneck in the application is the XML parsing. I'm looking for advice on what is the most efficient XML parsing module is, and what I can do to optimize XML reading/writing in general.

Currently, I'm using XML::Simple, with XML::SAX installed. Here is a look at my dproffpp output currently:

%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 15.3   1.476  1.816  49365   0.0000 0.0000  XML::Simple::collapse
 13.3   1.287  2.459 132588   0.0000 0.0000  XML::SAX::Expat::_handle_char
 11.8   1.135  2.805  49365   0.0000 0.0001  XML::SAX::Expat::_handle_start
 10.0   0.968  7.429    515   0.0019 0.0144  XML::Parser::Expat::ParseStream
 9.46   0.910  1.179  49365   0.0000 0.0000  XML::SAX::Expat::_handle_end
 8.31   0.799  0.799 132588   0.0000 0.0000  XML::Simple::characters
 7.25   0.697  0.697  49365   0.0000 0.0000  XML::Simple::start_element
 4.74   0.456  1.172 132588   0.0000 0.0000  XML::SAX::Base::characters
 4.54   0.437  0.437  49365   0.0000 0.0000  XML::NamespaceSupport::_get_ns_details
 3.00   0.289  0.308  44287   0.0000 0.0000  XML::Simple::array_to_hash
 2.26   0.217  0.217  49365   0.0000 0.0000  XML::NamespaceSupport::push_context
 1.93   0.186  0.205   5395   0.0000 0.0000  Params::Validate::_validate
 1.85   0.178  0.323   3378   0.0001 0.0001  DateTime::TimeZone::new
 1.79   0.172  0.853  49365   0.0000 0.0000  XML::SAX::Base::start_element
 1.49   0.143  0.580  49365   0.0000 0.0000  XML::NamespaceSupport::process_element_name
LVL 1
timdrAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ps15Commented:
One of the fastes ways of parsing XML ist event based with XML::Sax

See Also:
http://search.cpan.org/dist/XML-SAX/SAX.pm
http://search.cpan.org/dist/XML-SAX/SAX/Intro.pod

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ozoCommented:
What kind of processing do you need to do on the input and output?
If you do not need full XML parsing, there may be some short cuts you could take.
timdrAuthor Commented:
I don't know if I can do anything but full XML parsing, but i will definitely look into these. What about for regular full xml parsing, is there anythign faster then what I'm using? The reason I ask is because I just recently found that installing XML::SAX greatly increased the speed of things, without any change in code (still using XML::Simple), so I'm trying to find anything else I can install that would help.

If not, I'll see what I can do about the event based parsing.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.