I'll hazard a guess that XML::Simple is reading the whole file, parsing it, creating a data structure and only then returning. That's always going to take time, and for a large document it'll produce a *huge* data structure which might even make your machine swap - hence the sloooooowness.
You might want to look at a streaming parser instead, which reads the file a bit at a time, generating a series of events for you to handle. It'll be a bit more work but will save an awful lot of memory. Even if it's not any faster over all, it'll at least start giving you data sooner so will *appear* to be faster!
In reply to Re: XML::Simple help
by DrHyde
in thread XML::Simple help
by Viki@Stag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |