[Twisted-Python] Performance issue in reactor.callLater

Glyph Lefkowitz glyph at divmod.com
Tue Sep 7 14:13:41 EDT 2004


On Tue, 2004-09-07 at 13:07, Jp Calderone wrote:

>    heapq.py is under the PSF license.  PSF is roughly similar to MIT. 
> Is this going to be okay for inclusion in Twisted?

It's part of Python, so I don't see why that would be necessary.

However, I have profiled various heapq-based schemes for callLater in
the past, and they always end up losing pretty big in the average case,
and winning only in perverse cases such as hundreds of callLater(0)s per
tick.  I saw a little discussion of the performance impact, but I am
still not entirely convinced that it's a good idea.





More information about the Twisted-Python mailing list