Skip to content

Commit 5df9d34

Browse files
ihor-svizievaa-kashk
authored andcommitted
Improve performance of indexer when many attribute options
Revert not needed changes
1 parent 859e614 commit 5df9d34

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/ProductDataMapper.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,6 @@ private function getAttributeOptions(Attribute $attribute, int $storeId): array
398398
* $attribute->getOptions() loads options into data objects which can be costly.
399399
*/
400400
$options = $attribute->usesSource() ? $attribute->setStoreId($storeId)->getSource()->getAllOptions() : [];
401-
402-
if (!empty($options)) {
403-
$options = array_combine(
404-
array_column($options, 'value'),
405-
$options
406-
);
407-
}
408-
409401
$this->attributeOptionsCache[$storeId][$attribute->getId()] = $options;
410402
$attribute->setStoreId($attributeStoreId);
411403
}

0 commit comments

Comments
 (0)