InternetReadFile very slow on XP
Posted on 2006-05-17
I have a program the uses the wininet.dll for FTP. My program is syncronizing the contents of a directory on a remote PC with an inhouse WinNT 4.0 FTP server. Nothing fancy.
I use FtpPutFile and FtpGetFile to move whole files between computers and I use InternetReadFile to read the contents of smaller files that contain status information on each end. I have used this program for close to 3 years without any problems. However, within the last few months, I have been getting reports of long, long pauses in the process. My log files indicate it is always during the call to "InternetReadFile".
One instance reads 10 bytes from a file on the remote end. It looks like it locks up, but will eventually complete the read and be successful. However, it takes almost 2 minutes! It is almost like a reverse DNS timeout, but for the life of me can't imagine "InternetReadFile" doing any sort of DNS hit (?)
Calls to FtpPutFile and FtpGetFile work fine (i.e. a 400K file moves in 5-10 seconds or so on same connection)
All the machines so far are "new" and have either XP Home or Pro. I've never seen it on 98,me or 2K, although I don't have many in the field any more...