On Sat, Feb 19, 2011 at 20:24, Michael Fischer <[email protected]> wrote: > And until the response is returned, the underlying descriptor will > *always* be writable after it has connected. But since we have no > knowledge of what's going on with the underlying HTTP transaction, we > ignorantly keep calling curl_multi_perform() anyway. This is very > expensive, but we can't stop doing it until we get our response. The > CPU expense is proportional to the response latency. > > What can be done to make this more efficient?
You should register CURLMOPT_TIMERFUNCTION and CURLMOPT_SOCKETFUNCTION callbacks. See [1] for an example. [1] https://github.com/bagder/curl/blob/master/docs/examples/hiperfifo.c ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
