If you have any print
statements, comment them out - they can actually slow your script down quite a bit especially if they’re in your looping of the data. Better to put that stuff into a logger anyways (which does not slow your script down like a print does).
But as mentioned, post your script otherwise we can only speculate.