When I run this script through a browser, I get massive (99%) apache resources being used. Whats all this 0.01% stuff about? tried with and without real sockets!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
which script did you try? (maybe an example script)
the 0.01% I got on a P3 1ghz under Linux with the socket extension,
99% is not possible, SmartIRC has routines that slows the script down, with socket extension under linux its the best, with windows without socket extension the worst, the reason is windows don't know usleep() and throttleing through socket extension is only possible if its used. If you got windows and no socket extension then there is no way of throtteling, change OS or load socket extension and activate it in SmartIRC... Also try the last version from CVS, it has alot improvements with socket extension loading etc...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got it sorted by changing usleep() to sleep(1) the reactions are a little slow, but at least it works. Im developing on Windows atm, once its sorted and running on the server, Ill change it back to usleep() :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I run this script through a browser, I get massive (99%) apache resources being used. Whats all this 0.01% stuff about? tried with and without real sockets!
which script did you try? (maybe an example script)
the 0.01% I got on a P3 1ghz under Linux with the socket extension,
99% is not possible, SmartIRC has routines that slows the script down, with socket extension under linux its the best, with windows without socket extension the worst, the reason is windows don't know usleep() and throttleing through socket extension is only possible if its used. If you got windows and no socket extension then there is no way of throtteling, change OS or load socket extension and activate it in SmartIRC... Also try the last version from CVS, it has alot improvements with socket extension loading etc...
I got it sorted by changing usleep() to sleep(1) the reactions are a little slow, but at least it works. Im developing on Windows atm, once its sorted and running on the server, Ill change it back to usleep() :)
You could just add a stream_select call if you are in PHP 4.3.0 or newer on windows. It should give you instant response times, and nearly 0 load.
I can use stream_select on file handles? If yes, this woulb be real cool, then I can get rid of the usleep() hack for fsocks...