simplest answer is find out yourself. every machine will depending on config and
hardware will be difffernet.
<?php
function mtime()
{
$mtime = microtime();
$mtime = str_replace('.', '', $mtime);
$mtime = explode(' ', $mtime);
$mtime = $mtime[1] . $mtime[0];
return($mtime);
}
class debug
{
function debug()
{
$this->start = mtime();
}
function reset()
{
$all_vars = get_object_vars($this);
foreach($all_vars as $pos => $val)
if ($pos != 'error')
unset($this->$pos);
}
function time($text = '')
{
$this->break = mtime();
$time = ($this->break - $this->start) / 1000000000;
echo number_format($time, 4) .' '. $text ."<br>\n";
$this->start = $this->break;
}
}
$debug = new debug;
//-------------------------------------------------------------------
$debug->time('start');
// code snippit
$debug->time('end');
?>
works great or me. you can find out exactly where your code is slowing you down, only
thing is now to find out how to improve that :)
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PROTECTED]
""Joe Sheble (Wizaerd)"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Is it in-efficient to use shuffle()? I have a simple 6 element array with 6
strings (URLs to images) and I'm using shuffle() to display all of them in
random order upon each page load. The images take a long time (of course is
relative, it's mere seconds) but when I remove the call to shuffle, they
appear much much faster...
Also, is there an efficient number or limit of queries one should call in a
singular PHP page? On average, I'll make 7-10 seperate queries to display a
page (a graphics related portal and content management system)... I have a
singular database connection (with mysql_pconnect()) and use that same
connection throughout the script. Sometimes it appears to load quickly,
than other times it doesn't, and I'm afraid that as more and more content
get put into the databases, the slower it will perform.
user authentication
navigation (link definitions)
form dropdowns (dynamic selects)
banner rotation (2 sets, big and small)
activity tracker
headline or story retrieval
comments
Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=================================
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]