Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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

Replies are listed 'Best First'.
Re^2: Going through a big file
by Chuma (Beadle) 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?
Discipulus second time; no questions.. o tempora o mores..
[1nickt]: I understood the first version ;-)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-11-24 22:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (354 votes). Check out past polls.

    Notices?