huge PHP file, hardcore processing
| From: | Christian Dechery | Date: | Tue, 10 Apr 2001 00:29:33 +0000 |
| Subject: | huge PHP file, hardcore processing | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47902@lists.php.net to get a copy of this message | ||
I have a huge (at least I think, for a script anyway) PHP script... it is over 1.000 lines of code.
And it updates (do an entire DELETE-ALL / LOAD-ALL) an SQL Server database (over 35MB). It runs for over an hour (sometimes 2hs)... and I divided it into steps... so each step is a function in the script that when is over calls a javascript function that reloads the script to the next step.
I was wondering if this is enough to get a good 'memory-cleaning'. Or it would be better to have lots of files (in total, there are 27 separate steps). I began noticing some processing slowness after the first 35 mins... it get's 'tired'. The script starts running and with ob_implicit_flush() on, the output is flushed almost at real time... but after 10 or 12 steps it starts to get slow and do NO FLUSHING at all... only showing the entire output at once after the whole step has ended. Should I split it into files? Is because it's running on (eek!) IIS? Maybe the size of the file is getting in the way?
Can someone help me out?
Ah... one other thing. Has anybody experienced very weird behaviours of PHP with IIS? Sometimes I press 'stop' at the browser but PHP is still running. I can see it eating up memory in the TaskManager. And it won't stop until I kill it. And the most weird part is, as soon as I call a script (any script) PHP returns to the TaskManager with the same amount of memory it had when it was running tha massive script mentioned above. Does IIS really suck, or is there something very wrong with my config?
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer