soylatte and

Leif Nelson lnelson at
Mon Dec 10 17:02:46 PST 2007

Hey Landon-

I re-built the jdk with your patch.  Appserver startup time for the OC4J container went from 136 seconds (soylatte-1.0) to 7 
seconds (soylatte-patched).   Startup time for OC4J container 
went from 72 seconds (soylatte-1.0) to 3 seconds (soylatte-patched).  
Those numbers for the patched soylatte match (almost exactly) what we 
get from java 5.

Thanks so much!


Landon Fuller wrote:
> On Dec 6, 2007, at 8:56 AM, Leif Nelson wrote:
>>   Also, each subsequent invocation of InetAddress.getLocalHost() 
>> takes another 8 seconds, and apparently this method is called several 
>> times!  I did some tests on several macs running both Tiger & Leopard 
>> with java5 and java6 to demonstrate the issue.
>> After some tracing with, I found that 
>> the time is all taken up inside of the native method: 
>> If I trace with (the default), I 
>> found that the native method 
>> gets called instead 
>> returns very quickly.
>> I hope this narrows it down enough to find out what's wrong. :-)
> Thanks!
> I tracked it down to this copy/paste bug in the BSD-specific code 
> (which I believe I wrote some time ago, so it's my bug)
>     error = getaddrinfo(hostname, "domain", &hints, &res);
> The "domain" service argument causes getaddrinfo() on Mac OS X to make 
> (time consuming) MDNS SRV requests for the service:
>     12:16:03.619145 IP > 0 SRV 
> (QM)? _domain._udp.max.local. (40)
> The service argument should have been NULL. I committed a fix for this 
> upstream, and will include it in the next release:
>     landonf at max:/tmp> /tmp/j-build/bsd-i586/bin/java 
> TestHostName
>     Found: in: 9 ms.
> Patch: 
> Thanks again for the report,
> -landonf

More information about the porters-dev mailing list