This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients William.Edwards, giampaolo.rodola, sbt
Date 2012-10-18.00:03:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350518630.23.0.779040172532.issue16269@psf.upfronthosting.co.za>
In-reply-to
Content
> Do you mean at the C level?

No, Python of course.

> poll(), unlike select(), does not have to scan an fd_set 
> (of 1024 bits?) so I would have expected it to be faster if anything.

That might be true in a continuous loop (e.g. a reactor).
Judging from where this is supposed to take place (http://hg.python.org/cpython/file/f6fcff683866/Lib/multiprocessing/connection.py#l865) what you would end up doing within the wait() function is:

- init_pollster()
- register(fd) * num of fds
- unregister(fd) * num of fds
- close_pollster()

...and I suspect that's likely to be slower than just using select(), even if you cache the poll object. Anyway, I might be wrong, and figuring that out with a simple benchmark is easy.
Other than that I'm not sure how often wait() gets called usually so even if a slowdown is introduced that might not even be a problem.
History
Date User Action Args
2012-10-18 00:03:50giampaolo.rodolasetrecipients: + giampaolo.rodola, sbt, William.Edwards
2012-10-18 00:03:50giampaolo.rodolasetmessageid: <1350518630.23.0.779040172532.issue16269@psf.upfronthosting.co.za>
2012-10-18 00:03:50giampaolo.rodolalinkissue16269 messages
2012-10-18 00:03:50giampaolo.rodolacreate