Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 7 of 7
Saving Products Very Slow After Upgrade to 1.3.0
 
dan_lala
Member
 
Total Posts:  42
Joined:  2009-07-13
Germany
 

We just updated to 1.4.0.1 and saving our 11k products is okay for us now. From up to 1min to 10s now, but we also don’t have any catalog rules.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tom1801
Jr. Member
 
Total Posts:  13
Joined:  2009-05-28
KA, Germany
 
Matthieu Fauveau - 09 March 2010 07:18 PM

Yes, I confirm. If you have lots of product (we have 6K+) and catalog rules, it’s painfully slow even under 1.4.0.1. My client is starting to get really annoyed.

hi, i also can confirm this.
if i turn catalog rules off, saving products takes about 5 seconds. but i need them so i have to turn them on.
so there must be something that is done only wtih price rules on, after saving product which takes a lot of time. the question is, what is it and can it be turned off.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

Hi All,

yes this in fact the case that when i turn off all my catalogue rules and do updates for products in admin its very quick.

What I did to test this is make my Catalogue price rules in-active first. Then do products updates and finally re-activate the price rules.

Its not a perfect solution, but it works and can be managed

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
impact
Jr. Member
 
Total Posts:  12
Joined:  2009-01-23
 

Hi all,

Same problem over here, saving times of 90 seconds with just 500 products.

The price rule trick doesn’t work over here.

Is there any feedback from the Magento-team? Just to know if maybe we still overlook something grin.

Thanks for any tips!

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

I have seen some posts about the way it refreshes the indexes after saving that slows things down.

Cant recall the exact post. But for example if your just loading up new products, you might want to load them in first, then run the refreshing after the fact. Or at least have the option to disable refreshing during import

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
pgulikers
Jr. Member
 
Total Posts:  27
Joined:  2009-02-21
 

I also experienced very slow import, expecially with simple products, the $product->save(); statement takes 8 seconds to complete.
Debugged SQL and saw a separate delete query per category on the catalog_category_product_index table, like:

## 21989 ## QUERY
SQL: DELETE FROM `catalog_category_product_index` WHERE (category_id=4259 AND store_id=1 AND product_id IN (’6690’))
AFF: 0
TIME: 0.0002

The query is quick but it is run for every existing category in the store. (bug in mage::app->cleanCache() ?)

I found out that the reason is: I don’t have a category set for simple products but only for the associated configurable product and these import much quicker.

Solution:
Before $product->save(); add this line:

$product -> setCategoryIds('1');

and BANG! Up to speed again!!! I went from 1 record / 8 seconds to 3.85 records per second, that’s a 3000% performance gain!

Tried $product -> setCategoryIds(array()); as well, but that didn’t help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
walltoolsllc
Sr. Member
 
Total Posts:  146
Joined:  2008-08-21
 

OUR FIX TO SLOW SAVING OF PRODUCTS

We are on 1.3.2.3 currently (upgraded from 1.9)

1. I have disabled WEEE tax module in system/advanced
2.  I have cleared cache
3.  We save the product in admin and then hit escape on the keyboard after about 5 seconds

Product saves.  Before disabling the WEEE tax module, the little “escape keyboard” trick did not work.  It was taking several minutes to save a product before disabling WEEE tax.  Not sure what it is, but so far, our tax rates are still estimating on the front end ok?

Magento performance is poor.  Sure, it’s cool, but it’s not fast and reliable.  We currently have about 700 unique visitors to our site per day, and about 3,900 products on the site.  About 28 catalog price rules, and around the same amount of shopping cart price rules.  We only have 4 active customer groups (and one of them fried.) Anyway… I feel like I’m part of the wild west of ecommerce.  Better watch your back when running Magento, and learn to draw fast (at least search for bug fixes fast.)

 
Magento Community Magento Community
Magento Community
Magento Community
 
jadvo
Member
 
Avatar
Total Posts:  52
Joined:  2009-04-14
Melmek
 

SOLUTION for 1.3.2.4

Hi, I found a solution for this problem. When I save a product, there are executed more then 40k SQL queries! Most of them are INSERTs into table WEEE_DISCOUNT ( 38739 from 41793 queries).

This is done in app/code/core/mage/weee/model/mysql4/tax.php in updateDiscountPercents() method.

If you dont use weee tax, you can comment out whole content of this method.
I did this and it shortens product save time from few minutes to few seconds!

Maybe this tip works in other versions of Magento, I have tested it only in v 1.3.2.4

Hope this helps you

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

Will give this a try and see what it does.

If it fixes my problems, then I will never have any need to upgrade to 1.4.1, which to me is even more bloated than a 1.3x build.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ActiveMerchant
Jr. Member
 
Total Posts:  1
Joined:  2011-08-27
 

Well two things you have to check and it will fix it for you.

1 - Are you sung chrome? switch to firefox or other browser.
2 - place magento on a better hosting
3 - deal with your cache
4 - have you installed data with your magento? or clean installation


tweaks few things and it must work fine!

Magento works great if you tweak it well!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jk_inetz
Jr. Member
 
Total Posts:  3
Joined:  2011-02-11
 

I was able to reduce the time to save a single product by modifying the following two methods in

app/code/core/Mage/Sales/Model/Mysql4/Quote.php

public function markQuotesRecollectOnCatalogRules()
    
{
        $entityIds 
$this->_getReadAdapter()->fetchCol("SELECT DISTINCT quote_id
                FROM {
$this->getTable('sales/quote_item')}
                JOIN {
$this->getTable('catalogrule/rule_product_price')} ON ({$this->getTable('catalogrule/rule_product_price')}.product_id = {$this->getTable('sales/quote_item')}.product_id)");
        if(
count($entityIds) > 0{
            $this
->_getWriteAdapter()->query("
                UPDATE {
$this->getTable('sales/quote')} SET trigger_recollect = 1
                WHERE entity_id IN (?)"
implode(','$entityIds)
            );
        
}
    }

public function markQuotesRecollect($productIds)
    
{
        $entityIds 
$this->_getReadAdapter()->fetchCol("SELECT DISTINCT `quote_id`
                FROM `{
$this->getTable('sales/quote_item')}`
                WHERE `product_id` IN (?)"
$productIds
        
);
        if(
count($entityIds) > 0{
            $this
->_getWriteAdapter()->query("
                UPDATE `{
$this->getTable('sales/quote')}` SET `trigger_recollect` = 1
                WHERE `entity_id` IN (?)"
implode(','$entityIds)
            );
        
}

        
return $this;
    
}

This is one case where doing a subquery is slower. As your row count in sales_flat_quote gets larger the query goes slower.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

Hi Nice one.

That makes me think that I need to setup a job to clean up the old quotes tables. As they are getting quite large now.

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
saho
Member
 
Avatar
Total Posts:  52
Joined:  2008-08-06
 

For those of you having huge save times in 1.5 this fix worked wonderfully for us. http://www.magentocommerce.com/boards/viewthread/221229/P0/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mirasvit
Guru
 
Avatar
Total Posts:  639
Joined:  2009-08-22
 

Hi all. You can increase backend performance using asynchronous reindex extension. Check this one Fast Asynchronous Re-indexing http://mirasvit.com/magento-extensions/magento-asynchronous-reindex.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
MPro
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2013-02-14
 

There is one more solution for this problem - Catalog Database Accelerator, it is removing unnecessary Magento indexing and other processes on products that are not effected by the save. Since MPRo Catalog Database Accelerator Extension still allows the current product to be saved, indexed, and cached (if turned on), there are no side effects! Your changes are available on the site immediately and the time of the product save will be cut down drastically.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 7 of 7