![]() |
|
Think about Loose Coupling | |
PerlMonks |
Wondering about File::Findby jynx (Priest) |
on Dec 29, 2000 at 01:31 UTC ( [id://48695]=perlquestion: print w/replies, xml ) | Need Help?? |
jynx has asked for the wisdom of the Perl Monks concerning the following question:
Recently i posted a response to someone else's question in SOPW but since i don't know if it'll ever get hit by other monks who might answer my questions (since it turned out to be more questions than answers) i wanted to post something that would be seen. Sorry for the duplication, but i do want these questions answered if possible... In essence, i looked at someone else's answer and rewrote as a one-liner in File::Find:
However, when looking at @INC, it seems there are subdirectories in there that would be handled by the time we got there, this could produce some duplication and because of disk access, slow things down. So we make a hash of where we've been: Then the following questions came to mind: 1) is it faster to create the hash than search the directories again (if we ignore duplicate entries)? 2) is it faster to use or not use no_chdir? @INC is a small search space, but if we generalize this a little to larger unknown search spaces the questions seem a little more potent (to me at least). Since File::Find has to scan the disk it is one of the slower parts of programs and knowing how to use it better would certainly be a Good Thing(tm). i'm still pretty new to File::Find and these are things i was wondering, please help, jynx
Back to
Seekers of Perl Wisdom
|
|