Saving product has poor performance caused by product image cache generation on each save.
It came in MAGETWO-32410: Grouped Product Integration API
It really kills every product import performance.
In my opinion, it's not necessary since product image cache is generated on demand when cached image is requested.
We've imported 45,000 products with photos and it took 4 days.
With these lines commented it took about 12 hours.
// Resize images for catalog product and save results to image cache/** @var Product\Image\Cache $imageCache */if (!$this->_appState->isAreaCodeEmulated()) {$imageCache = $this->imageCacheFactory->create();$imageCache->generate($this);}
Preconditions (*)
Magento 2.2.5 EE (also happens on other Magento 2 versions)
Steps to reproduce (*)
Create product with any 4-5 images via API
Expected result (*)
Product is saved without generating image cache (as in Magento 1).
Actual result (*)
Image cache for product is created and it makes every product import extremely slow.
Summary (*)
Saving product has poor performance caused by product image cache generation on each save. It came in MAGETWO-32410: Grouped Product Integration API
It really kills every product import performance. In my opinion, it's not necessary since product image cache is generated on demand when cached image is requested.
We've imported 45,000 products with photos and it took 4 days. With these lines commented it took about 12 hours.
file
vendor/magento/module-catalog/Model/Product.php
// Resize images for catalog product and save results to image cache
/** @var Product\Image\Cache $imageCache */
if (!$this->_appState->isAreaCodeEmulated()) {
$imageCache = $this->imageCacheFactory->create();
$imageCache->generate($this);
}
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)