Magento - Profiling


Advertisements

The feature called Profiler which plays an important role in Magento development and can be used for debugging. It specifies blocks of code which makes loading of the page slow. Magento profiler reports the time taken by block of code to execute, number of times the block of the code was executed and memory used by it while rendering a Magento web page.

To enable the Profiler, follow these steps −

Step 1 − Login to your Magento Admin Panel.

Step 2 − Go to System menu and click on the Configuration option.

Magento Profiling

Step 3 − On the left side of the navigation bar, go to Advanced section and click on the Developer option.

Magento Profiling

Step 4 − Expand the Debug panel and enable the profiler by setting it to Yes and click on the Save Config button.

Magento Profiling

Step 5 − At this point the profiler is enabled, but you need to tell the profiler to what profile. So go to root index.php file of your Magento installation and look for the line #Varien_Profiler::enable(); and uncomment it, i.e. remove the hash sign.

Step 6 − Now go to any of your pages, you should see the output in the footer area of the page like shown in the following screen.

Magento Profiling
Advertisements