mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
transfer: avoid polling socket every transfer loop
Improve download performance, minimal effort. Do not poll the socket for pending data every transfer loop iteration. This gives 10-20% performance gains on large HTTP/1.1 downloads (on my machine). Closes #14098
This commit is contained in:
parent
2583d11f22
commit
b8e098a057
@ -336,7 +336,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
|
||||
if((k->keepon & KEEP_RECV_PAUSE) || !(k->keepon & KEEP_RECV))
|
||||
break;
|
||||
|
||||
} while(maxloops-- && data_pending(data));
|
||||
} while(maxloops--);
|
||||
|
||||
if((maxloops <= 0) || data_pending(data)) {
|
||||
/* did not read until EAGAIN or there is still pending data, mark as
|
||||
|
Loading…
Reference in New Issue
Block a user