Multiprocessing or Multithreading

0

Good people, recommend what to optimize the code? multiprocessing or multithreading? the script is running in series, but has several for series.

Full Code: link

    
asked by anonymous 04.07.2017 / 18:43

1 answer

0

First time I'm going to give a pitaco on this kind of subject. Based on this year's pycon lecture , it seems to me that your problem is best suited for handling and checking% with%. As it is an activity that requires more processing than it expects from I / O (taking the part of relation with BD), multiprocessing makes more sense.

But as I read the code very fast, it might be that extracting the data (SQL pulls based on heavy views, or something similar) is the time consuming, which would indicate multithreading but does not seem the case.

PS : gives the code more pythonic and lean saw, but you did not ask about it ^ _ ^.

    
04.07.2017 / 20:22