PROFILING CONTROLLERS
Short tutorial how to use xdebug to profile a controller:
- The first step is to identify slow controllers e.g. via firebug.
- Get the concrete url including parameters (in firebug there's a right-click option: "Copy Location with Parameters") and append &XDEBUG_PROFILE.
- Request the url to generate a trace-file which can be used to check for bottleneck. (check http://xdebug.org/docs/profiler for more information)
- You can find the file at
/tmp
namedcachegrind.out.NUMBER.
Open this file with software like kcachegrind and look for the problem. - Do performance boosting
- Repeat steps 3 till 5 until you are satisfied with the speed of your code