Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Is it wiser to move on from XML::Simple to XML::Compile ( XML::Hash::XS )

by mohan2monks (Sexton)
on Jan 27, 2014 at 09:26 UTC ( #1072196=note: print w/ replies, xml ) Need Help??


in reply to Re: Is it wiser to move on from XML::Simple to XML::Compile ( XML::Hash::XS )
in thread Is it wiser to move on from XML::Simple to XML::Compile

Thanks for reply.
I did check XML::Rules first, need to explore it further.
Did profile and found two bottlenecks

  1. Waiting for web service to reply (if it can be called bottleneck of code Nytprof does not consider IO waiting time )
  2. Time Taken by XML::Simple
    # spent 66.0s (147ms+65.9) within XML::Simple::XMLin which was called: + # once (147ms+65.9s) by main::RUNTIME


Comment on Re^2: Is it wiser to move on from XML::Simple to XML::Compile ( XML::Hash::XS )
Download Code
Re^3: Is it wiser to move on from XML::Simple to XML::Compile ( XML::Hash::XS )
by Jenda (Abbot) on Jan 27, 2014 at 12:29 UTC

    XML::Rules might be slightly quicker than XML::Simple, because it doesn't try to guess what would be the best way to convert the XML into a data structure, but that's not the main reason you should switch. The problem with XML::Simple is that (even if you do specify some options) the datastructure it generates is not consistent. Things like optional attributes and repeated tags may cause hard-to-handle inconsistencies. Well set XML::Rules will give you a consistent datastructure and allow you to ignore and skip data you are not interested in. This may lessen the memory footprint and speed things up.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2014-09-01 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (299 votes), past polls