11 use Magento\Customer\Model\ResourceModel\Group\CollectionFactory;
26 private $websiteManagement;
31 private $collectionFactory;
36 private $compositeProductRelationsCalculator;
45 CollectionFactory $collectionFactory,
48 $this->websiteManagement = $websiteManagement;
49 $this->collectionFactory = $collectionFactory;
50 $this->compositeProductRelationsCalculator = $compositeProductRelationsCalculator;
60 $websitesCount = $this->websiteManagement->getCount();
61 $customerGroupCount = $this->collectionFactory->create()->getSize();
62 $maxRelatedProductCount = $this->compositeProductRelationsCalculator->getMaxRelationsCount();
72 return ceil($maxRelatedProductCount * $websitesCount * $customerGroupCount * self::MEMORY_SIZE_FOR_ONE_ROW);
const MEMORY_SIZE_FOR_ONE_ROW
__construct(WebsiteManagementInterface $websiteManagement, CollectionFactory $collectionFactory, CompositeProductRelationsCalculator $compositeProductRelationsCalculator)