[Sussex] Ruby DNS resolver
Nic James Ferrier
nferrier at tapsellferrier.co.uk
Wed Sep 6 13:58:02 UTC 2006
Ronan Chilvers <ronan at thelittledot.com> writes:
> Now via the ruby resolv library:
> ronan at rncubuntu:rbl $ time ruby -e "require 'resolv'; res=Resolv::DNS.new; p res.getresource('dynablock.njabl.org',Resolv::DNS::Resource::IN::A)"
> #<Resolv::DNS::Resource::IN::A:0xb7cb27b0 @address=#<Resolv::IPv4 209.208.0.104>>
>
> real 0m5.036s
> user 0m0.024s
> sys 0m0.004s
>
> Not whoosh!!!!
<snip/>
> So it seems that the resolv libraries are the bit that's slow... seems
> excessive though...
Have you tried:
strace ruby -e "require 'resolv'; res=Resolv::DNS.new; p res.getresource('dynablock.njabl.org',Resolv::DNS::Resource::IN::A)"
to see exactly what the ruby code is doing? It seems like it's not in
the Ruby interpreter that much.
--
Nic Ferrier
http://www.tapsellferrier.co.uk for all your tapsell ferrier needs
More information about the Sussex
mailing list