[jboss-remoting-issues] [JBoss JIRA] Commented: (JBREM-1235) Avoid excessive calls to InetAddress.getLocalHost() [Clone of JBREM-1234]

Ron Sigal (JIRA) jira-events at lists.jboss.org
Mon Aug 2 16:54:49 EDT 2010


    [ https://jira.jboss.org/browse/JBREM-1235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12542559#action_12542559 ] 

Ron Sigal commented on JBREM-1235:
----------------------------------

Added org.jboss.remoting.util.LocalHostUtil and replaced all significant (omitting samples, tests) calls to InetAddress.getLocalHost() with calls to LocalHostUtil.getLocalHost().

No special unit tests.  Will watch hudson for unusual failures.

> Avoid excessive calls to InetAddress.getLocalHost() [Clone of JBREM-1234]
> -------------------------------------------------------------------------
>
>                 Key: JBREM-1235
>                 URL: https://jira.jboss.org/browse/JBREM-1235
>             Project: JBoss Remoting
>          Issue Type: Quality Risk
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.2.3.SP2
>            Reporter: Ron Sigal
>            Assignee: Ron Sigal
>             Fix For: 2.2.3.SP3
>
>
> From JBPAPP-4617 "Possible performance issue in Remoting":
> JMS remote connections that are used locally result in a lot of calls to InetAddress.getLocalHost() which for some reason is slow. 
> Why not:
>    private static final InetAddress LOCAL_HOST;
>    static
>    {
>       try
>       {
>          LOCAL_HOST = InetAddress.getLocalHost();
>       }
>       catch (UnknownHostException e)
>       {
>          throw new ExceptionInInitializerError(e);
>       }
>    }
>    private static InetAddress getLocalHost() throws UnknownHostException
>    {
>       return LOCAL_HOST;
>    }
> Which is roughly 1000x faster. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-remoting-issues mailing list