[medusa] asyncore.py descriptor-map hack

Sam Rushing rushing@n...
Thu, 24 Jun 1999 08:18:20 -0700 (PDT)


I changed asyncore.dispatcher to cache fileno() information in a
dictionary stored at the class level. This dictionary can be used to
feed select() file descriptors directly, therefore removing its need
to call the fileno() method of each socket object. [this was doubly
bad because it would trigger a __getattr__ call].

It's possible that this will remove a significant amount of overhead
from poll(), but I don't have time to thoroughly test it for speed
right now.

For those who might be interested, it's checked in as revision 2.41.
[2.40 and 2.42 are exactly the same, I couldn't figure out how to
correctly make a branch with CVS within 10 minutes so I gave up]

The following command will do the trick:
$ cvs up -r2.41 asyncore.py

-Sam


------------------------------------------------------------------------

eGroups.com home: http://www.egroups.com/group/medusa
http://www.egroups.com - Simplifying group communications