Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by mohan2monks (Beadle)
on Jan 27, 2014 at 09:26 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1072196]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-23 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found