When i enabled query logging in magento from ADD TO CART till the cart page completes loading, it actually gave me same queries repeating 30-40 times.Not all queries but some of them so i decided to trace it by enabling
protected $_logCallStack = true;
To my surprise the repeating queries in the query log are actually giving same trace details with small diff in some encoded chara for eg:
#9 Mage_SalesRule_Model_Rule_Condition_Product_Subselect#000000000a8f1b7500000000689133ef#->validate(&GoMage_Checkout_Model_Quote_Address#000000000a8f1bcd00000000689133ef#) called at [app/code/core/Mage/Rule/Model/Condition/Combine.php:251]
#9 Mage_SalesRule_Model_Rule_Condition_Product_Subselect#000000000a8f189300000000689133ef#->validate(&GoMage_Checkout_Model_Quote_Address#000000000a8f1bcd00000000689133ef#) called at [app/code/core/Mage/Rule/Model/Condition/Combine.php:251]
I am not understanding why the queries are repeatedly coming in my trace and why the same sequence of code is actually executing more than once and firing same queries repeatedly.
Or the tracing mechanism of magento is giving me wrong output?? Have anybody experienced this before.
xdebug.max_nesting_level
at default (100) should be enough to show the loop.