News for hackers. Stuff that matters.
Re:The multiprocessing module in Python by gshulegaard on Friday February 03, 2017 @03:25PM (#13562988)
I would recommend you use coroutines rather than multiprocessing.dummy for balancing blocking operations (like IO). I believe multiprocessing.dummy is just a wrapper for threading which has context switching overhead [1].

Python3 has asyncio as part of the stdlib but for Python2 there are a variety of coroutine libraries out there (I think the most widely recognized being gevent).

[1] https://www.youtube.com/watch?v=Obt-vMVdM8s

Re:The multiprocessing module in Python by rdtsc on Friday February 03, 2017 @04:06PM (#13563304)
Switching code-base to Python 3 or installing gevent/eventlet is certainly more than a 3 line hack.

> I believe multiprocessing.dummy is just a wrapper for threading which has context switching overhead [1].

Yap. But I am fetching and waiting for data to come from servers half-way across the country. Not worried about too much thread switching overhead. The point it was still faster than a for loop with a fetch. It was replaced by 3 lines which was 10x faster.