Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: speed issues

by 5mi11er (Deacon)
on May 16, 2008 at 04:01 UTC ( #686852=note: print w/replies, xml ) Need Help??

in reply to speed issues

I'm not yet completely groking your pseudo code, but it appears that you are doing way more work "finding" files than you need to do. Why do you need to find things 3 separate times? Oops, make that 4. If the directories are very large (many many files), each find is going to be very expensive. So, suggestion number one is to figure out a better way of getting at your data without having to search through several large directories multiple times.

It also appears that you may be iterating over the same information multiple times. You're getting a list of sites first, then counting how many there were? Count them as you find them if that's actually what's happening. Thus, suggestion two is to figure out how to iterate over the data once to both get the info you need and process it at the same time.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://686852]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-06-24 04:20 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.