Guido van Rossum added the comment:

Hi Joshua,

This is indeed a problem -- I just never expected that you would be having that 
many events and and canceling the majority.  I am sorry you had to debug this. 
:-(

This was anticipated by the author of pyftpdlib (Giampaolo Roloda'), who 
proposed an elegant solution: keep track of the number of cancelled events, and 
when the number gets too high (according to some measure) the heapq is simply 
rebuilt by filtering out cancelled events.  I think this is similar to your 
proposal (b).

I would love it if you could implement this!  Just make sure to add some tests 
and follow the PEP 8 style guide.  You can contribute upstream to the Tulip 
project first.  https://code.google.com/p/tulip/

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to