PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   sleep(5) in spider.php? (http://www.phpdig.net/forum/showthread.php?t=543)

bsw114 02-18-2004 05:47 PM

sleep(5) in spider.php?
 
Anybody know why the sleep(5) is in the big loop in spider.php? I took it out and surprisingly saved 5 seconds per file indexed. Besides the obvious consequences of not giving the CPU a rest, is there any good reason to have a sleep?

Charter 02-19-2004 05:40 AM

Hi. If you crawl sites that are not yours, setting a delay is the courteous thing to do so that you do not place too high of a load on the other person's machine.

Konstantine 03-12-2004 01:31 PM

Why don't make a settings for that? for example "force indexing!" :) And when it's on, indexing is speeded up. Or force every 5 urls and sleep after that for a 5 secs, then again... and so on...


All times are GMT -8. The time now is 09:05 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.