in reply to Re^2: How do I create an array of hashes from an input text file?
in thread How do I create an array of hashes from an input text file?
For very large files XML::Simple is probably not a good route. It will require you to load the entire XML data structure into memory.
Should you see performance issues, you should take a look at XML::LibXML which is much more powerful. It offers and interface to DOM and SAX parsers. In particular, SAX based parsing may be the best choice if memory becomes an issue as it is event based as opposed to data structure based.
SAX will offer more in the way of memory management while DOM will offer more speed at the price of a larger footprint.
If you want to stick with a XML::Simple style interface, but just gain some speed, you can take a look at XML::Bare which is written in XS and among the fastest in terms of runtime. It does have a few less niceties that XML::Simple, but offers an option to create the same style of data structures.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How do I create an array of hashes from an input text file?
by MrSnrub (Beadle) on Nov 12, 2011 at 00:44 UTC | |
by Kc12349 (Monk) on Nov 16, 2011 at 17:46 UTC |