Smush large amount of pictures

I have to smush 230.000 pictures and it is going dead slow!
How can I speed this up?
I have done 3000 photos in 24hours...