Re: Problem with Socket and CPU usage!
| From: | Eric COLINET | Date: | Tue, 11 Nov 2003 15:17:51 +0000 |
| Subject: | Re: Problem with Socket and CPU usage! | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-22070@lists.php.net to get a copy of this message | ||
Hi,
What the timeout of your socket_select ?
Because when the timeout is NULL or a big value your script normally 'sleep' when nothing append.
Eric
At 15:14 11/11/2003, Alex wrote:
Hello ALL! I've made an IRC client with DCC support (it uses many sockets) I use socket_select in an infinite loop. All works fine, but the problem is CPU usage. When I start my script CPU-usage rises to 100% and stops there :( So I wander is there any way to optimize the code to lower the CPU usage? It is really a big problem running this script cause it slows down other programs. HELP me please! Thanks for attention! Best regards to all! -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php