bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/27828] New: Overly aggressive use of InetAddress.getHostN


From: green at redhat dot com
Subject: [Bug classpath/27828] New: Overly aggressive use of InetAddress.getHostName()
Date: 31 May 2006 01:15:48 -0000

One of the InetSocketAddress constructors includes...

    this.hostname = addr.getHostName();

This seems overly aggressive.  In comparing azureus log files from Sun and gcj
runs, it looks like Sun's libraries take a lazy approach to getting the
hostname.
I propose that we simply delete that line and modify
InetSocketAddress.getHostName() to call addr.getHostName() if not already set
(like in InetAddress).  InetSocketAddress.toString would have to be modified as
well (similar to InetAddress.toString).

This should eliminate many useless reverse-DNS requests in applications like
azureus.


-- 
           Summary: Overly aggressive use of InetAddress.getHostName()
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: green at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27828





reply via email to

[Prev in Thread] Current Thread [Next in Thread]