RFR: 7903746: jtreg tests run extremely slow on some environments due to hostname lookups [v2]

Mark Sheppard msheppar at openjdk.org
Wed Jul 3 11:03:30 UTC 2024


On Tue, 2 Jul 2024 23:32:38 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> src/share/classes/com/sun/javatest/regtest/config/RegressionEnvironment.java line 61:
>> 
>>> 59: 
>>> 60: 
>>> 61:     private static final class LazyHostNameLookup {
>> 
>> LazyHostNameLookup infers a lookup deferred to the latest possible moment While 
>> CachedHostName would convey a more appropriate semantics.
>> 
>> The rational for the change is the cost of a getCanonicalHostName invocation. However, InetAddress caches a getLocalHost
>> call in a CachedLocalHost, which provides a mapping between a hostname and an InetAddress, but this cached value is not used in the getCanonicalHostName invocation. This seems strange that the cached values in InetAddress are not used more effectively for return a Hostname !!
>
> @msheppar Is this worth a P4 followup RFE against InetAddress?

It probably is worth raising an issue. I think I raised some years back. IIRC the thinking at the time was the hostname is  dynamically configurable so it is necessary to obtain the most current setting (but then again so are IP addresses and they are extensively cached). Nonetheless, it is worth further discussion as an enhancement

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

PR Review Comment: https://git.openjdk.org/jtreg/pull/204#discussion_r1664004937


More information about the jtreg-dev mailing list