Magento2: ImportExport: performance problem with multi store setup, inventory item reindex

Created on 29 Jul 2016  路  7Comments  路  Source: magento/magento2

Preconditions

  1. Magento 2.1.0

Steps to reproduce

  1. Setup 50 stores, with 50 seperate root categories with each their own subcategories.
  2. Import products using the importer, 200 should be enough

Expected result

  1. It does a little bit less than 14000 queries for 200 products ;)

Actual result

  1. [Screenshot, logs]

schermafbeelding 2016-07-29 om 14 26 32
schermafbeelding 2016-07-29 om 14 26 40

Format is valid Reach Digital improvement

Most helpful comment

@mrkhoa99 We're using https://blackfire.io/, works pretty great

All 7 comments

Hello @paales ,
I'm interesting in your tool? Which tool you use to check the performance?

@mrkhoa99 We're using https://blackfire.io/, works pretty great

I guess the indexer should triggered somewhere else:
https://github.com/magento/magento2/blob/develop/app/code/Magento/CatalogImportExport/Model/Import/Product.php#L2070

As a matter of fact, I believe this handled by the cataloginventory_stock_cl if I'm not mistaken.

I think it doesn't have to do with the multiple stores, it is just that the indexer is triggered for each bunch. Shouldn't happen inside the importer, the indexing should happen afterwards or just by the indexer cron :)

It seems I had the indexers set to _On Save_. Although the performance shouldn't be as bad with _On Save_, I have to investigate further if this problem occurs when the stock items are actually updated _On Schedule_

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

too bad it was moved and forgotten @piotrekkaminski

Was this page helpful?
0 / 5 - 0 ratings