cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_READFUNCTION performance issue

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 29 Jul 2013 13:21:12 +0200 (CEST)

On Sun, 28 Jul 2013, Clemens Gruber wrote:

> Would be interesting to know if the Nagle algorithm improves libcurl
> performance at all. Maybe it does in some protocol handlers, but not in
> others.., etc.

libcurl is a pretty thin layer too in some aspects. I can very well imagine
that an application's particular usage pattern can make the situation better
or worse as well.

> A quote from Wikipedia:

...

>> it will not benefit a carefully written application that takes proper care
>> of buffering; the algorithm has either no effect, or negative effect on the
>> application.
>
> Does curl take "proper care of buffering"? If yes, could it be beneficial to
> set CURLOPT_TCP_NODELAY per default?

It can only do so much. You could argue that in this particular case of using
the callback method to POST a mere 10 bytes is a rather inefficient approach
to buffering...

I'd rather not change the default just based on some wild speculations though,
so if someone truly wants to argue for altering the Nagle on/off default
switch somehow, I'd ask for data and statistics to back it up first!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-29