Wednesday 15 June 2011

PHP slowdown, but where -


I have a PHP page that loads from an mysql query in an HTML table and orders PHPmyadmin this 0.003 seconds , But my page takes 0.5 seconds. Everywhere PHP code is slow, but I shuffle it on debugging.

One thing I did to speed up the performance is that I got something like

  (if $ var = = '123') {// action} < / Code>  

While changing $ var did not exist

  if (isset ($ var)) {if ($ var == '123') {// Action}}   

The script became very fast when $ var was not around.

My question: What is the best way to detect recession in my script? Are there many more things like this?

There should not be much difference in performance on this, it is very strange about your code / config You have not told us to try to run your code through a profiler (I use xdebug + kcachegrind - but you did not say which OS you are using).

How do you get your page load time? The PMA usually does not show a complete result set. 0.003 seconds Looks a bit optimistic It is not certain that I believe in your analysis. But definitely 0.5 seconds is very slow.

No comments:

Post a Comment