Multiprocessing optmization