curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Curl upgrade from 7.65.1 to 7.70.0 causing performance degradation

From: Kunal Chandarana via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 25 Sep 2020 09:00:18 -0700

On Fri, Sep 25, 2020 at 1:01 AM Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 25 Sep 2020, Daniel Stenberg via curl-library wrote:
>
> > I converted it into a "real" PR and submitted it here:
> >
> > https://github.com/curl/curl/pull/6013
>
> Reading the code a little more and thinking further, *maybe* this is
> actually
> a more appropriate fix, what do you say?
>
> --- a/lib/easy.c
> +++ b/lib/easy.c
> @@ -1060,12 +1060,14 @@ CURLcode curl_easy_pause(struct Curl_easy *data,
> int
> action)
> return result;
> }
> }
>
> /* if there's no error and we're not pausing both directions, we want
> - to have this handle checked soon */
> - if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
> + to have this handle checked soon
> + NOTE: 'k->keepon' might have gotten updated in the client_write call
> + above */
> + if((k->keepon & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
> (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) {
> Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again
> */
>
> /* force a recv/send check of this connection, as the data might've
> been
> read off the socket already */
>
> My two cents - this would work only if pause is in both the directions
(send and recv). If 'keepon' is either receive pause or send pause then
that condition would always be true and it will force read/write from/to
the socket. The specific issue I am experiencing won't be fixed with it.

-Kunal

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-09-25