I've noticed recently that when i test things on my mac, the admin console
pages are really slow ... working on the stats page, i realized that there
was a 10 second built in delay on *every* admin page, and i traced it to
these lines in _info.jsp ...
InetAddress addr = null;
String hostname = "unknown";
try {
addr = InetAddress.getLocalHost();
hostname = addr.getCanonicalHostName();
} catch (UnknownHostException e) {
//default to unknown
}
...on every page load it's trying to do a reverse DNS lookup so it can
display the current hostname in the admin header, and that reverse DNS is
(evidently) timing out on my dev box.
The question i have: should we...
a) leave this alone (ie: it's my fault for using an IP that can't be
resolved to a name)
b) change it so it's done once on startup in a static block (ie: he info
is useful, but not likely to change so only pay the cost once)
...thoughts?
-Hoss