Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Things every perl programmer should know? (faster?)

by licking9Volts (Pilgrim)
on Jun 05, 2003 at 18:07 UTC ( #263430=note: print w/replies, xml ) Need Help??


in reply to Re: Things every perl programmer should know? (faster?)
in thread Things every perl programmer should know?

The files I work with are actually logs that record information at set intervals down an oil well's borehole. So, depending on the depths of these logs, I have files that range in size from around 100kb to 50mb. My program only needs to read from a block of information at the top, and extract certain bits to a text file. Once it hits a specific delimiter, it closes the file and moves on to the next file. The file name is a 10-14 digit identification number plus an optional version number. When I was globbing the files, it was taking around 5 minutes to get started. With the readdir, it starts immediately.

I am running perl version 5.6.0 on Win2k. Our machines here at work are managed by off-site personnel and have the registries and "Program Files" folders locked down so I can't upgrade the perl version or make any modifications to it. Any software has to be tested and packaged for company-wide distribution via intranet. It really sucks. So anyway, that's my situation. Here's the node where the readdir was suggested: File glob question. Let me know if you have any suggestions. Thanks!

licking9Volts
  • Comment on Re: Re: Things every perl programmer should know? (faster?)

Replies are listed 'Best First'.
Re: Re: Re: Things every perl programmer should know? (faster?)
by TomDLux (Vicar) on Jun 06, 2003 at 13:46 UTC

    So readdir isn't necessarily significantly faster, as far as finishing time is concerned---the important factor is the impression of responsiveness, seeing the first results after a short delay instead of after all the file names have been globbed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://263430]
help
Chatterbox?
[perldigious]: Hmm, thanks Lotus1... perldigious scribbles note to buy lots of opossums as "pets" in the future to hang around outside his property. :-P
[1nickt]: You must twist and pull! If you burn, use tea tree oil etc, the tick barfs (inside your blood vessel) and you get all the loevely bacteria in his gut transferred to yours.
[1nickt]: tweesers work just fine
[hippo]: Hope everyone else is enjoying their lunch too.
[1nickt]: However, note that it takes between 2 and 4 hours for a tick to be able to start transmitting bacteria. So even if it has burrowed in and started eating, if you get it soon you should be OK.
[perldigious]: 1nickt: No more red meat! It would be more humane to just kill you, wouldn't it! :-)
[1nickt]: Just don't make it barf.
[1nickt]: perldigious that's exactly what my stepson says.
[1nickt]: the tick that can make you a vegetarian
[perldigious]: Your Mother: Yeah, I have a tool for ticks that I use (mostly on my dogs thankfully), but it's just a cheapo one I got from my vets office... it works pretty good though.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2017-05-24 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?