Re: Re: Speed issues
| From: | The.Wiz | Date: | Thu, 15 May 2003 19:19:30 +0000 |
| Subject: | Re: Re: Speed issues | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19958@lists.php.net to get a copy of this message | ||
Are you doing a bunch of sql queries or something? The other question is
have your turned on error logging for php to see if it is hanging up on
something possible. Turn on logging for IIS as well if it isn't already.
Check you php.ini file and change error_reporting = E_ERROR to
error_reporting = E_ALL and see if that gives you any messages that might
help with your problem.
"Charles P. Killmer" <charlesk@netgaintechnology.com> wrote in message
news:B141BE87473AA64FB24370C43CEA54BD29FC7D@ngexbe1.my-netgain.com...
I use the prepend and append directives in php to log to a file the
total script execution time of every php file. I use the same
getmicrotime functions to get down to the milliseconds that the page
excution takes.
What I am seeing is in these log files. Some times a single script will
take 30+ seconds but other times that same script takes <1 second. I
have even seen this in a script that has only a single if-then
statement. No other code exists in that script.
My only thought is that if a client gets a very slow connection maybe
that would cause a queue to form somewhere.
Charles
-----Original Message-----
From: The.Rock [mailto:chrisz@aurumtechnology.com]
Sent: Thursday, May 15, 2003 10:56 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Re: Speed issues
I'm on the same platform as you and sometimes when I refresh it takes a
couple of seconds to create the page. So I built this funtion to see how
long it really takes to create. I believe it is IIS serving up the
webpage that makes it takes so long. Put the start time at the beginning
of the script and the end time at the bottom (footer??)..Here ya go:
function getmicrotime() {
$bits = explode(" ", microtime());
return $bits[0] + $bits[1];
}
//this gets the start time it takes to run a script
$time_start = getmicrotime();
// lets get the ending time
$time_end = getmicrotime();
$total=$time_end-$time_start;
$total_format= number_format($total,4);
print "Created page in $total_format sec(s)";
"Charles P. Killmer" <charlesk@netgaintechnology.com> wrote in message
news:B141BE87473AA64FB24370C43CEA54BD29FC31@ngexbe1.my-netgain.com...
PHP 4.3.1 CGI mode
IIS 5.0
Windows 2000 Server
Every now and then I get scripts that take > 30 seconds to complete. The
same script usually takes < 1 second. Could a client on a VERY slow
connection be slowing this process down?
In a request process who handles queueing the data until the client can
download all of it? IIS or PHP or both?
Charles Killmer
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php