lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject admin pages can be slow because of reverse DNS - should we fix?
Date Mon, 19 Oct 2009 20:08:15 GMT

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


Mime
View raw message