Saving Product very slow in Magento (solved)

  • magento save product slow
  • magento product save slow
  • magento saving products very slow
  • magento slow product save

I have met problem saving product in Magento, it takes very long time to finish one product. After an hour searching and I found a solution to solve this problem. Instead of saving all magento product attribute we update only changed attribute by below code:
Mage::getSingleton('catalog/product_action')
->updateAttributes(array($productId), $attributesData, $storeId);

Above code only updates the attributes you want to change. The first paramater is an array of product IDs, the second is an array of attribute names and values, and then the third is the store ID you wish to update.
Enjoy coding.

Comments Closed