Thanks Wige. You are spot on as always. Yes. The latency is largely due to the reverse lookup of the IP addresses. Right now my script sets up a table of rogue bot IP addresses which is used by another script to do the lookup. This technique doesn't impact the latency to any noticeable manner.