mirror of
https://github.com/curl/curl.git
synced 2026-05-30 11:37:28 +03: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue