I'm helping a friend to improve performance on their pretty mid-small sized magento store.

First thing I was looking is the Magento Profiler, from what I can see there is those methods that takes lots of time(6-7 seconds!)

layout/db_update: cms_menu  6.5310  1   0   0
layout/db_update: cms_page  6.5292  1   0   0
layout/db_update: STORE_default 6.5274  1   0   0
layout/db_update: THEME_frontend_agent_default  6.5256  1   0   0
layout/db_update: cms_index_index   6.5236  1   0   0
layout/db_update:   6.5217  1   0   0
layout/db_update: customer_logged_out

Any ideas how to go deeper and understand what's the bottleneck? I guess its some slow mysql queries.

I'm looking for tools/tips to help me to dig into it and get extra info

1 Answer 1


The profiler acts like a tree, so when you read that CMS_Page takes 6 seconds, you need to look deeper down the list to find out which sub-elements slow down the page that much (you should look for about 0.3s on CMS pages).

Aoe made an extension that makes the Profiler much more "User Friendly", but it's a matter of preference. Here is the link if you want to give it a try: https://github.com/AOEpeople/Aoe_Profiler

Then it's case-per-case. Most of the time, your bottleneck will come from modules or bad templating and unless you're in the milliseconds, it will be pretty obvious. A good way to have a point of comparison is to create a clean installation (on the same Magento version) and compare the times for each type of page; CMS, Category, Product, Homepage, Checkout being the critical ones.

  • Hi, thanks! will give aoe_profiler a chance. I looked for the "first" event that took alot of time, and it's some template file: (homepage.phtml) Will go over the code and will try to see if i see some bad code :)
    – Guy S
    Aug 21, 2015 at 15:07
  • Bad code in templates like homepage.phtml is a safe bet :D Watch out for products loaded in a loop Aug 21, 2015 at 15:23
  • @fschmengler - yup! thats what I catched gist.github.com/mp3il/30d4e33ab04a57e1d650 Im debugging it, but if you can point me (its my first time working with magento, though I have experience with php). My guess is the $simple_product_loaded. How can I filter the disabled products so I can remove the piece of code that loading each one to check if its disabled(!!!)
    – Guy S
    Aug 21, 2015 at 15:32
  • 1
    This is a horrible peace of code. What is it even doing in a .phtml file? *smh Aug 21, 2015 at 15:43
  • 1
    Some tips for efficient product collection loading that might help you: magento.stackexchange.com/a/78497/243 Aug 21, 2015 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.