Some of my PHP pages are loading slow probably because there is some code that's taking to long.
Is there any software or ways for PHP to check what happens when a script loads and how long it takes. I'm pretty sure there is on for PHP 5 but what about PHP 4?
PHP pages loading slow
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
I tend to add debug information to check timing based on microtime. If you are using a database, this is probably your sticking point. One common mistake is to have multiple selects where you could use a join (even if it is an outer join
). Another is using "SELECT *" where you only want one or two columns. With the Zend Framework Zend_DB you have something call a profiler which times SQL commands automatically but this should only be used if you use the Zend Framework already.
Without knowing anything about your code it is hard to give a pointer.
Without knowing anything about your code it is hard to give a pointer.
I can. It's called X-Debug ( http://xdebug.org/ ). It's ace, but rather complicated.Mordred wrote:I can't recall if there is a free and open source alternative.
