Do you have slow page load times? Are you developing a plugin and suddenly it's making your site run VERY slow?
In order to address performance issues within your code, you can use an out of the box solution provided by Magento. It is the Varien Profiler. It basically monitors the time and memory allocation of your application loading cycle at specific intervals you set. It's also very easy to use.
//First, enable the profiler Varien_Profiler::enable(); //Second, start the profiler with a special key Varien_Profiler::start('my-special-key'); //do some php code //next, stop your profiler with the same key Varien_Profiler::stop('my-special-key'); //Last, disable your profiler Varien_Profiler::disable();
Now you've captured how long it's taken to execute your code.
But where do you see it?
In order to do that, you have to go into your Magento admin panel and go to System->Configuration->Advanced->Developer. Go to the Debug tab and enable the profiler.
Click save, refresh the cache and go to your frontend. Load a page and scroll to the bottom. You should see something new.
Its an output of your profile you just ran.
Also, if you want to profile your whole application and see where there are bottlenecks, simply go into your index.php file and uncomment the following line:
Just don't forget to comment it out again once you are done!
Now you will be able to check and see any bottlenecks or resource hogs in your application.
I hope this helps.
Until next time.



Hi,
If I use magento API is there a log where I can see the output?
Thanks,
Shay
You can always check system logs and exception logs to see if there is an error, but unless you’ve configured logs yourself, there isn’t any that log automatically.