M2CliTools icon indicating copy to clipboard operation
M2CliTools copied to clipboard

Memory exhausts when there is very large amount of images to delete.

Open nahidacm opened this issue 6 years ago • 1 comments

For some core migration bug my system generated 170 GB of duplicate images. When I tried to clean those images, this module ran out of memory allocation.

I understand that, to be more interactive, you had to store all the image file names into an Array. And that caused the issue.

It would be great if you could add another flag which will directly delete the unnecessary images rather than storing the names in array.

CleanupUnusedProductMedia.php.txt

nahidacm avatar Nov 28 '18 06:11 nahidacm

@nahidacm what about introducing a parameter with the maximum amount of images to clean? Should be optional. max-files-count for example. You could send a pullrequest.

ThomasNegeli avatar May 23 '19 09:05 ThomasNegeli