[Python-Dev] _socket efficiencies ideas

Sean Reifschneider jafo@tummy.com
Wed, 9 Apr 2003 13:22:48 -0600


On Wed, Apr 09, 2003 at 08:36:17PM +0200, "Martin v. L?wis" wrote:
>I disagree. Python should expose the resolver library, and leave caching
>to it; many such libraries do caching already, in some form.

Why don't we carry it to the logical conclusion and say that the
resolver should also avoid doing a forward lookup on an already numeric
IP?

I've noticed that before the Red Hat 8.0 release, doing a "telnet <ip>"
would usually be very fast on the initial connection, and since 8.0 it's
been slow as if doing a lookup...  To me that indicates that the
resolver used to do this and has been changed to not, which makes me
wonder why that was...

Perhaps we're being too clever and it's going to come back to bite us?
The "<numeric>" syntax would allow us to leave
resolution as it is and let the user override it when they deem
necessary.  If we try to auto-detect (which I'm usually all for), we
should probably implement a "<forcedns>" or similar?

Sean
-- 
 Geek English Rule #7: To reduce redundancy, the word "scary" can be left
 out of any statement containing the phrase "scary java applet".
Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
tummy.com, ltd. - Linux Consulting since 1995.  Qmail, Python, SysAdmin