Open kardi31 opened 3 years ago
Architecture
When Ergonode is building products & synchronising product images, it downloads remotely whole image content. The content is not used at all, but it takes a lot of time to download the image through API (10sec/image in our case).
https://github.com/ergonode/exporter-shopware-6-backend/blob/main/src/Infrastructure/Client/Shopware6ProductMediaClient.php#L150
Do not download image through API. Ergonode as PIM should be a source of truth, we should not care about the content of image on remote server.
When sending GET request to remote server, all we need to verify is whether response is successful & not empty. We should ignore the content of image.
Ergonode version: 1.0.1 Detailed information: - PHP version: 7.4 Others:
cc @wfajczyk @piotrkreft
Bug type
Architecture
Current behavior
When Ergonode is building products & synchronising product images, it downloads remotely whole image content. The content is not used at all, but it takes a lot of time to download the image through API (10sec/image in our case).
Input Code
https://github.com/ergonode/exporter-shopware-6-backend/blob/main/src/Infrastructure/Client/Shopware6ProductMediaClient.php#L150
Expected behavior
Do not download image through API. Ergonode as PIM should be a source of truth, we should not care about the content of image on remote server.
Possible Solution
When sending GET request to remote server, all we need to verify is whether response is successful & not empty. We should ignore the content of image.
Environment
cc @wfajczyk @piotrkreft