Right now it is very slow and takes up a significant chunk of the 24 h limit. Multiprocessing has been attempted, but with disappointing results due to the massive amounts of memory that had to be copied (I think). Instead try optimize the code itself