curl/lib
Marc Hoersken e92998a312
multi: reduce Win32 API calls to improve performance
1. Consolidate pre-checks into a single Curl_poll call:

This is an attempt to restructure the code in Curl_multi_wait
in such a way that less syscalls are made by removing individual
calls to Curl_socket_check via SOCKET_READABLE/SOCKET_WRITABLE.

2. Avoid resetting the WinSock event multiple times:

We finally call WSAResetEvent anyway, so specifying it as
an optional parameter to WSAEnumNetworkEvents is redundant.

3. Wakeup directly in case no sockets are being monitoring:

Fix the WinSock based implementation to skip extra waiting by
not sleeping in case no sockets are to be waited on and just
the WinSock event is being monitored for wakeup functionality.

Assisted-by: Tommy Odom
Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad

Bug: #6146
Closes #6245
2021-04-21 20:32:14 +02:00
..
vauth ntlm: fix negotiated flags usage 2021-04-09 09:40:56 +02:00
vquic ngtcp2: Use ALPN h3-29 for now 2021-04-13 14:22:32 +02:00
vssh libssh: fix "empty expression statement has no effect" warnings 2021-04-19 08:30:04 +02:00
vtls sectransp: allow cipher name to be specified 2021-04-21 12:00:22 +02:00
.gitattributes
.gitignore
altsvc.c
altsvc.h
amigaos.c
amigaos.h
arpa_telnet.h
asyn-ares.c
asyn-thread.c
asyn.h
base64.c
c-hyper.c urldata: merge "struct DynamicStatic" into "struct UrlState" 2021-03-26 23:19:20 +01:00
c-hyper.h
checksrc.pl
CMakeLists.txt Revert "cmake: make libcurl library output name configurable" 2021-04-21 15:03:26 +02:00
config-amigaos.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-dos.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-mac.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-os400.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-plan9.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-riscos.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-tpf.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-vxworks.h lib: remove unused HAVE_INET_NTOA_R* defines 2021-04-08 16:33:29 +02:00
config-win32.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
config-win32ce.h configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
conncache.c
conncache.h
connect.c connect: use CURL_SA_FAMILY_T for portability 2021-04-21 09:22:37 +02:00
connect.h
content_encoding.c
content_encoding.h
cookie.c urldata: merge "struct DynamicStatic" into "struct UrlState" 2021-03-26 23:19:20 +01:00
cookie.h
curl_addrinfo.c
curl_addrinfo.h
curl_base64.h
curl_config.h.cmake lib: remove unused HAVE_INET_NTOA_R* defines 2021-04-08 16:33:29 +02:00
curl_ctype.c
curl_ctype.h
curl_des.c
curl_des.h
curl_endian.c config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T 2021-03-11 10:11:56 +01:00
curl_endian.h config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T 2021-03-11 10:11:56 +01:00
curl_fnmatch.c
curl_fnmatch.h
curl_get_line.c hsts: enable by default 2021-04-19 08:22:16 +02:00
curl_get_line.h
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c
curl_gssapi.h
curl_hmac.h
curl_krb5.h
curl_ldap.h
curl_md4.h
curl_md5.h
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
curl_multibyte.h copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
curl_ntlm_core.c ntlm: support version 2 on 32-bit platforms 2021-04-09 09:40:49 +02:00
curl_ntlm_core.h ntlm: support version 2 on 32-bit platforms 2021-04-09 09:40:49 +02:00
curl_ntlm_wb.c
curl_ntlm_wb.h
curl_path.c
curl_path.h
curl_printf.h
curl_range.c
curl_range.h
curl_rtmp.c urldata: merge "struct DynamicStatic" into "struct UrlState" 2021-03-26 23:19:20 +01:00
curl_rtmp.h
curl_sasl.c curl_sasl: fix compiler error with --disable-crypto-auth 2021-03-28 23:03:15 +02:00
curl_sasl.h
curl_setup_once.h configure: include <time.h> unconditionally 2021-04-07 16:08:01 +02:00
curl_setup.h curl_setup: provide the shutdown flags wider 2021-04-21 09:24:46 +02:00
curl_sha256.h
curl_sspi.c
curl_sspi.h
curl_threads.c
curl_threads.h
curlx.h
dict.c
dict.h
doh.c docs: Explain DOH transfers inherit some SSL settings 2021-03-17 18:12:45 -04:00
doh.h
dotdot.c
dotdot.h
dynbuf.c
dynbuf.h
easy.c hsts: enable by default 2021-04-19 08:22:16 +02:00
easygetopt.c
easyif.h
easyoptions.c
easyoptions.h
escape.c
escape.h
file.c file: support GETing directories again 2021-04-05 12:22:07 +02:00
file.h
fileinfo.c
fileinfo.h
firefox-db2pem.sh
formdata.c
formdata.h
ftp.c ftp: fix memory leak in ftp_done 2021-03-12 19:53:05 +01:00
ftp.h
ftplistparser.c
ftplistparser.h
getenv.c
getinfo.c urldata: merge "struct DynamicStatic" into "struct UrlState" 2021-03-26 23:19:20 +01:00
getinfo.h
gopher.c
gopher.h
hash.c
hash.h
hmac.c
hostasyn.c
hostcheck.c
hostcheck.h
hostip4.c
hostip6.c
hostip.c configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
hostip.h
hostsyn.c
hsts.c hsts: enable by default 2021-04-19 08:22:16 +02:00
hsts.h hsts: enable by default 2021-04-19 08:22:16 +02:00
http2.c http2: remove DEBUG_HTTP2 2021-04-21 11:34:10 +02:00
http2.h http2: move the stream error field to the per-transfer storage 2021-04-21 08:20:24 +02:00
http_aws_sigv4.c
http_aws_sigv4.h
http_chunks.c
http_chunks.h
http_digest.c
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c
http_ntlm.h
http_proxy.c http_proxy: only loop on 407 + close if we have credentials 2021-04-05 22:49:07 +02:00
http_proxy.h
http.c hsts: enable by default 2021-04-19 08:22:16 +02:00
http.h http2: move the stream error field to the per-transfer storage 2021-04-21 08:20:24 +02:00
idn_win32.c
if2ip.c
if2ip.h
imap.c
imap.h
inet_ntop.c
inet_ntop.h
inet_pton.c
inet_pton.h
krb5.c
ldap.c urldata: merge "struct DynamicStatic" into "struct UrlState" 2021-03-26 23:19:20 +01:00
libcurl.plist
libcurl.rc
libcurl.vers.in
llist.c
llist.h
Makefile.am
makefile.amiga
makefile.dj
Makefile.inc
Makefile.m32 copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
Makefile.netware configure: remove use of RETSIGTYPE 2021-04-07 16:01:05 +02:00
Makefile.vxworks
md4.c
md5.c
memdebug.c copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
memdebug.h
mime.c
mime.h
mk-ca-bundle.pl
mk-ca-bundle.vbs
mprintf.c
mqtt.c
mqtt.h
multi.c multi: reduce Win32 API calls to improve performance 2021-04-21 20:32:14 +02:00
multihandle.h Revert "Revert 'multi: implement wait using winsock events'" 2021-04-21 20:29:36 +02:00
multiif.h
netrc.c
netrc.h
non-ascii.c
non-ascii.h
nonblock.c
nonblock.h
nwlib.c
nwos.c
openldap.c openldap: protect SSL-specific code with proper #ifdef 2021-04-15 23:31:41 +02:00
optiontable.pl
parsedate.c
parsedate.h
pingpong.c
pingpong.h
pop3.c
pop3.h
progress.c send_speed: simplify the checks for if a speed limit is set 2021-03-27 12:38:28 +01:00
progress.h
psl.c
psl.h
quic.h
rand.c
rand.h
rename.c
rename.h
rtsp.c urldata: merge "struct DynamicStatic" into "struct UrlState" 2021-03-26 23:19:20 +01:00
rtsp.h
select.c
select.h
sendf.c
sendf.h
setopt.c hsts: enable by default 2021-04-19 08:22:16 +02:00
setopt.h
setup-os400.h
setup-vms.h
setup-win32.h
sha256.c
share.c
share.h
sigpipe.h
slist.c
slist.h
smb.c config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T 2021-03-11 10:11:56 +01:00
smb.h config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T 2021-03-11 10:11:56 +01:00
smtp.c
smtp.h
sockaddr.h
socketpair.c
socketpair.h copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
socks_gssapi.c
socks_sspi.c
socks.c
socks.h
speedcheck.c
speedcheck.h
splay.c
splay.h
strcase.c
strcase.h
strdup.c
strdup.h
strerror.c
strerror.h
strtok.c
strtok.h
strtoofft.c
strtoofft.h
system_win32.c
system_win32.h
telnet.c
telnet.h
tftp.c tftp: remove unused struct fields 2021-03-23 13:37:10 +01:00
tftp.h
timeval.c
timeval.h
transfer.c transfer: clear 'referer' in declaration 2021-03-29 09:45:53 +02:00
transfer.h
url.c ConnectionExists: respect requests for h1 connections better 2021-04-21 08:20:24 +02:00
url.h
urlapi-int.h
urlapi.c urlapi: make sure no +/- signs are accepted in IPv4 numericals 2021-04-21 09:17:55 +02:00
urldata.h hsts: enable by default 2021-04-19 08:22:16 +02:00
version_win32.c
version_win32.h
version.c hsts: enable by default 2021-04-19 08:22:16 +02:00
warnless.c
warnless.h
wildcard.c
wildcard.h
x509asn1.c
x509asn1.h