Hi,

> If I used usleep, what would be a reasonable time to set it, in  
> microseconds?

It really depends on you hosting server resources as what kind of  
delay you need. What I was thinking was you might make this a  
continuing process. Like this: enumerate the file structure to scan,  
store it in a mysql table or flat file, scan part of the file  
structure and store where you left off in the table, run script on  
crontab to getting where to scan from table, when it reaches the end  
of the file structure it starts over. You can set the crontab for  
every 3 minutes or 10 minutes to spread it out.

Sincerely,
Mike
-- 
Mike Brandonisio          *    Web Hosting
Tech One Illustration     *    Internet Marketing
tel (630) 759-9283        *    e-Commerce
[EMAIL PROTECTED]    *    http://www.jikometrix.net

     JIKOmetrix - Reliable web hosting


On Mar 5, 2006, at 10:14 PM, Bob wrote:

> Thanks Mike,
> I just experimented with sleep(); for the first time, locally on my  
> computer, (usleep(); doesn't work on Windows according to the  
> manual) so by using it, it still counts towards the 30 secs max of  
> php.
>
> When php is in sleep, I'm assuming that very little resources are  
> used, just the timer.
>
> If I used usleep, what would be a reasonable time to set it, in  
> microseconds?
>
> p.s. Time taken to read and scan 800 files locally without any  
> delay: 1.1487 secs.
> Bob.
>
> ----- Original Message -----
> From: "Mike Brandonisio" <[EMAIL PROTECTED]>
>
>> It really depends on the hardware you are hosted on. If you are on an
>> over sold server or nearing it's practical limits, yes it might use
>> more than you share of resources. A delay would help as it should
>> allow other processes to make use of CPU time. However I don't think
>> it would help if if your script is a memory hog. If you do not need
>> it in real time and could spread out your interrogations over a time
>> span it would be better. Like have the script search in blocks of 100
>> files per minute or something. Your Host might even work with you for
>> testing to avoid server issues.
>
>
>
> Community email addresses:
>   Post message: php-list@yahoogroups.com
>   Subscribe:    [EMAIL PROTECTED]
>   Unsubscribe:  [EMAIL PROTECTED]
>   List owner:   [EMAIL PROTECTED]
>
> Shortcut URL to this page:
>   http://groups.yahoo.com/group/php-list
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



Community email addresses:
  Post message: php-list@yahoogroups.com
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to