[Twisted-Python] Did anyone use pprocess before?
Peng Xiao -X (penxiao - Digital China at Cisco)
penxiao at cisco.com
Sun Mar 25 19:59:52 MDT 2012
Hi experts,
I have a question about pprocess module.
When I use:
time1 = time.time()
results = pprocess.pmap(calculate, sequence, limit=limit)
time2= time.time()
# Show the results.
for result in results[i*N:i*N+N]:
pass
time3 = time.time()
I found
time2 - time1 = 0.8 seconds,
but time3 - time2 = 7 seconds.
calculate the results is very fast, but when I use for loop to get the
result from the results, it's slow, why?
Does anyone know this? very thanks.
Best
Regards,
Xiao Peng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20120326/bd12f032/attachment.html>
More information about the Twisted-Python
mailing list