Optimize the mapper/reducer event loops