[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] Remove set_windows_fd_as_blocking_socket()?
From: |
Gisle Vanem |
Subject: |
[Bug-wget] Remove set_windows_fd_as_blocking_socket()? |
Date: |
Tue, 5 Aug 2014 22:48:02 +0200 |
A little study of why calling the function 'set_windows_fd_as_blocking_socket()'
is needed, reveals that on downloading a big file (400MByte using ftp), the
Winsock functions 'WSASetLastError()' and 'WSAGetLastError()' are called
approx. 277.000 times!! IMHO this is a terrible waste of CPU-time.
So I read a bit from the Gnulib bug-reports from 2011 on this:
https://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00201.html
(the URL in mswindows.c seems a dead link).
My test with disabling this function all together showed no ill effect.
I failed to find a Gnulib reference/changelog where this bug was fixed
(after 2011), but reading some sources failed to find any place where
a network-socket is set to blocking in Gnulib's select() or poll().
Hence I request that the call to 'set_windows_fd_as_blocking_socket()'
should be removed.
BTW. the actual call to Winsock's ioctlsocket() is performed by some
hairy FD-hook stuff inside Gnulib if anybody wants to verify it.
--gv
- [Bug-wget] Remove set_windows_fd_as_blocking_socket()?,
Gisle Vanem <=