Single Call Product->Load Cacheing
I'll admit I havent had the chance to try this in Magento2 but have found this to have noticeable gains in Magento 1.7
The issue is when the cart is loaded, it needs to load all the products for each cart code / promotion it needs to check against. If you have a lot of cart codes / promotions, it needlessly reloads the product for every one. Obviously one product and one promo won't show any gains but as the number of promos and products increases, the savings become measurable.
Originally saw this here: http://www.neptuneweb.com/blog/discuss/29-improving-magento-checkout-performance-with-large-number-of-cart-rules.html
app\code\core\Mage\Catalog\Model\Production.php
/**
-
This override caches the product load for a single call
-
Usefull for the cart where it re-loads the product for every promotion it needs to check against *
-
@param mixed $id
-
@param mixed $field
-
@return Mage_Core_Model_Abstract */ public function load($id, $field=null) { global $ECV_GLOBAL_CACHE; if (isset($ECV_GLOBAL_CACHE)) {
} else { $ECV_GLOBAL_CACHE = array(); } if (isset($ECV_GLOBAL_CACHE[$id])) { return $ECV_GLOBAL_CACHE[$id]; } else { $ECV_GLOBAL_CACHE[$id] = parent::load($id,$field); return $ECV_GLOBAL_CACHE[$id]; } }
Hello. Thanks for the feedback. We will analyze this change and get back to you.
@fr0x , the issue you reported exists and we know about it. Unfortunately we cannot agree to fixing it with the way you suggested. We have a ticket for this issue in our internal bug tracker and placed it to the product backlog. We will process it according to the priorities in our roadmap.
The team could not reproduce this issue in Magento 2. For Magento 1 issues, please report this in the Magento bug tracker http://www.magentocommerce.com/bug-tracking/report/. Thank you!
@verklov I have next issue:
Mac OS 10.9.2
Google Chrome 34.0.1847.116
Try removing all cookies for magentocommerce.com. This might help. If not, let me know, I will check this issue with our netops.
@verklov clearing cookies for this domain is fixed this issue. Thanks.
You are welcome! :-)