[Patches] [ python-Patches-729293 ] Regain speed lost w/ timeout change

SourceForge.net noreply@sourceforge.net
Tue, 29 Apr 2003 03:19:50 -0700


Patches item #729293, was opened at 2003-04-28 22:02
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=729293&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
>Assigned to: Skip Montanaro (montanaro)
Summary: Regain speed lost w/ timeout change

Initial Comment:
The speed loss reported by the Twisted folks today is fairly easy
to work around.  The attached patch implements it in one
possible way.  I've never used new-style classes before, however,
so the patch looks ugly to me.  Maybe that's just the way you have
to do things with new-style classes.  Then again, maybe there's
a better way to do it.


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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-29 06:19

Message:
Logged In: YES 
user_id=6380

It's ugly because it is an internal implementation detail.

I suggest two changes: 

1) There's no use case for a socket object that has no send,
recv, sendto or recvfrom methods, so you might as well do
the assignments unconditionally.

2) The cloe() method needs to sever all ties to the real
socket object, by setting the 4 new slots to None.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=729293&group_id=5470