I am attempting to use XDebug to troubleshoot the performance of a Moodle server. After loading the cachegrind output files into kcachegrind, I've been able to establish that one of the time consuming routines is "setup.php" (a Callee Map is provided below). While I understand the breakdown of functions such as "initialise_cfg()" (and the resulting database functions used), I'm not sure how to determine exactly what code is (relatively) taking a long time, i.e. what PHP code is being executed resulting in the large Aqua area coloured of the figure.

If someone could advise how I can go about determining where this CPU time is being used it would be appreciated.

My cachegrind output file is accessible at:

http://www.massey.ac.nz/~prynhart/downloads/xdebug_20111107.out

A PDF of the Moodle source file /var/www/dev1/login/index.php is accessible at:

http://www.massey.ac.nz/~prynhart/downloads/var_www_dev1_login_index_php.pdf

Any help would be appreciated. enter image description here

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.