I ran into memory-limit issues using "media:images:removeorphans".
I had about 200GB of media files (actually 198GB orphaned files) - I didn't count the amount of files.
The usual workaround "php -dmemory_limit=-1 -f n98magerun.phar media:images:removeorphans" did not help.
So I decided to use SPL to get around this issue.
I ran into memory-limit issues using "media:images:removeorphans". I had about 200GB of media files (actually 198GB orphaned files) - I didn't count the amount of files. The usual workaround "php -dmemory_limit=-1 -f n98magerun.phar media:images:removeorphans" did not help. So I decided to use SPL to get around this issue.