Magento News
Saving In Magento Taking A Very Very Long Time
In Magento I write a number of small command line scripts to do things like set a new attribute on a number of products. I am finding that the time it takes to update 900 products takes about 6 hours to complete.
The time it takes to load the individual products goes as fast as I would except, but the act of saving once I have made the change takes a very long time.
I am attaching how I am loading the products in case there is something I can do to better optimize the process. Any help here would be greatly appreciated.
$product = Mage::getModel('catalog/product')->load($magento_id);
$product->setMadeInUsa(1);
try {
$product->save();
} catch(Exception $e) {
echo "ERROR: " . $e->getMessage() . "n";
}
The code runs without error, but it takes forever.
Thanks much
Josh Pennington
Saving In Magento Taking A Very Very Long Time
Possibly Related Posts:
- Magento – ‘proceed to checkout’ button to go to login page if not logged in
- magento geolocation redirect
- Magento Post Image File Request
- How to get items from last order on login and clearing cart on logout?
- Fatal error Undefined class constant ‘METHOD_GUEST’ [Magento]
RSS Feed