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

Re: Going through a big file

by RMGir (Prior)
on Jan 17, 2013 at 13:03 UTC ( #1013771=note: print w/ replies, xml ) Need Help??


in reply to Going through a big file [solved]

Aside from the excellent advice above about using while rather than for, you may also want to consider looking at the File::SortedSeek module.

It's not directly applicable to what you're doing, but you could use it for inspiration - if your XML is in any kind of sorted order, you can save ENORMOUS amounts of time by doing binary searches if you only need to process a small subset of the file.


Mike


Comment on Re: Going through a big file
Replies are listed 'Best First'.
Re^2: Going through a big file
by Chuma (Acolyte) on Jan 17, 2013 at 14:10 UTC
    Thanks, I do actually need to process the whole thing, but I'll keep that in mind for later anyway.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-29 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls