From: Robert William Vesterman Date: 2004-09-17T02:54:48+09:00 Subject: Ruby's FTP incredibly slow - culprit is peeraddr I just wrote (in Ruby) a little tool to help with FTPing a bunch of files. It turned out to be ridiculously slow. Upon investigation, it turns out that the culprit is the following line in the "sendport" define of the standard FTP library (i.e. "require 'net/ftp'"): af = (@sock.peeraddr)[0] This line is executed once per file that I'm trying to transfer, and consistently takes (on my machine) five seconds or so each time that it is executed. The purpose of this line is to determine whether the remote host is IP4 or IP6. Commenting out the line, and hardcoding the IP4 path (which is what my test host is) makes the whole program work fast and well. What is the problem with this line, that it takes five seconds? I am using Ruby 1.8, by the way. Thanks, Bob Vesterman.