Jump to content

PS 1.7.5.0 / 1.7.6.1 very slow on updating products with attributes


zanpo

Recommended Posts

I'm confronting myself with a very slow admin after upgrading to PS 1.7.5.0 and even on 1.7.6.1, the same problem, when I try to update something from products (for example stock, or description or title) the "save" button takes forever to update the product.

I enabled dev mode, and I get this performance result (when updating attribute stock):

Quote

Performance metrics
221501 ms
Total execution time

From the attached image, "controller" eats up a lot of time, but I don't know what it refers to.

Any ideas why is this happening, the store has around 5500 products with attributes and 60 categories.

Server specs:

Quote

 

nginx/1.16.1

PHP: 7.2.24

memory limit: 1024M

execution time: 600s

 

perf.thumb.png.78d4701f1d1e6d3175f3bc24b0b5f8f1.png

Edited by zanpo (see edit history)
Link to comment
Share on other sites

  • 5 months later...

The problem can be related to a registered hook in a module.

classes/stock/StockAvailable.php, line 619 executes this hook:
 

Hook::exec('actionUpdateQuantity',
array(
	'id_product' => $id_product,
	'id_product_attribute' => $id_product_attribute,
	'quantity' => $stock_available->quantity,
));

In my case, I had module "Mail alerts" enabled which uses that hook. Since my server wasn't configured to send mails, it was causing a huge bottleneck.
It was taking around 20 sec. on saving/deleting a product!

After disable the module it took 2 secs on PHP 5.6. I tested it on products with around 10 combinations each.

 

Edited by Mercader Virtual (see edit history)
Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...