cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP PUT performance issues

From: Rick Jones <rick_jones2_at_hp.com>
Date: Thu, 05 Dec 2002 11:28:45 -0800

>
> I've now done some modfications, and it now works like this:
>
> 1. select() until socket is writable
> 2. read() data to send (unless data was left from previous round)
> 3. send() as much as possible, if less than full buffer GOTO 1
> 4. GOTO 2

That look slike a good improvement.

Is this code called in situations where it is known that most of the
time the socket is not already writable? If not, then I'd say go ahead
and start sending and only select after an incomplete send or
EWOULDBLOCK.

The importance may not be so much for libcurl in most situations, but in
providing a coded example of a "best practice" for avoiding overhead in
things like select() in general, so that when people leverage code they
will be leveraging code that is as good as possible.

rick

-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-12-05