I have a PHP page that loads and orders about 130 results from a mysql query into a HTML table. PHPmyadmin does this in 0.003 seconds, but my page takes 0.5 seconds. Somewhere the php code is slow, but I suck at debugging it.
One thing I did to speed up performance is that I found something like
if($var == '123'){ //action }
while $var did not exist. By changing it to
if(isset($var)){
if($var =='123'){
//action
}
}
the script became much faster when $var was not around.
My question: what is the best way to find out the slowdown in my script? Are there more things like this?